Frame 1
function klik() {
zvukZlato.start();
}
function novaUroven(kolik) {
if (kolik) {
uroven = kolik;
} else if (uroven >= system.MAXUROVEN) {
uroven = 1;
} else {
uroven++;
}
den++;
if (den == 28) {
den = 0;
}
gotoAndPlay ("konecUrovne");
}
function urciCenuVylepseni() {
return(maxZiv * 150);
}
function tracking() {
_root.skore = 0;
myURL = "http://www.gamegarage.co.uk/scripts/";
url = myURL + "tracking.php";
lv = new LoadVars();
lv.game_id = _root.game_id;
lv.user_id = _root.user_id;
lv.sendAndLoad(url, lv, "POST");
}
function scoring() {
myURL = "http://www.gamegarage.co.uk/scripts/";
url = myURL + "score.php";
lv = new LoadVars();
lv.game_id = _root.game_id;
lv.user_id = _root.user_id;
lv.score = skore;
lv.alg = ((_root.game_id + _root.user_id) + skore) + "a83l9xj";
lv.sendAndLoad(url, lv, "POST");
_root.skore = 0;
}
var i = -1;
while (getInstanceAtDepth(i)) {
i--;
}
createEmptyMovieClip("kv_mc", i);
kv_mc.kv_v = {c:140, td:"advergamer.140.memecounter.com"};
System.security.allowDomain(kv_mc.kv_v.td);
kv_mc.kv_v.c_so = SharedObject.getLocal(kv_mc.kv_v.c, "/");
kv_mc.kv_v.d = (_root.ori_dom ? (_root.ori_dom) : (((_root._url.split("/")[0].indexOf("http") == -1) ? "Local" : (_root._url.split("/")[2].split("?")[0]))));
kv_mc.kv_v.fpv = getVersion().split(" ")[1].split(",")[0];
kv_mc.kv_v.lurl = ((((((((((("http://" + kv_mc.kv_v.td) + "/tracker.php") + "?c=") + kv_mc.kv_v.c) + "&r=") + Math.floor(Math.random() * 10000000000)) + "&d=") + kv_mc.kv_v.d) + "&u=") + (kv_mc.kv_v.c_so.data.u ? "1" : "")) + "&p=") + kv_mc.kv_v.fpv;
kv_mc.kv_v.c_so.data.u = true;
kv_v.c_so.flush();
kv_mc.kv_v.t_mc = kv_mc.createEmptyMovieClip("kv_tracker", 0);
kv_mc.kv_v.l_mcl = new MovieClipLoader();
if (kv_mc.kv_v.l_mcl.loadClip) {
kv_mc.kv_v.l_mcl.loadClip(kv_mc.kv_v.lurl, kv_mc.kv_v.t_mc);
} else {
loadMovie (kv_mc.kv_v.lurl, kv_mc.kv_v.t_mc);
}
ceny = new Array(0, 5, 10, 20, 30, 0, 0, 0);
maxTrubek = 30;
maxZiv = 4;
cenaOpravy = 150;
cenaVylepseni = 150;
typyPotvor = new Array({zivoty:0, sila:0, rychlost:0, skodi:2}, {zivoty:2, sila:1, rychlost:1, skodi:2}, {zivoty:2, sila:1, rychlost:1.2, skodi:2}, {zivoty:4, sila:1, rychlost:1.5, skodi:2}, {zivoty:4, sila:2, rychlost:1.7, skodi:2}, {zivoty:1, sila:2, rychlost:1, skodi:1}, {zivoty:4, sila:2, rychlost:0.75, skodi:2, sutry:1}, {zivoty:2, sila:2, rychlost:1.7, skodi:2, lita:-1}, {zivoty:2, sila:2, rychlost:1.2, skodi:2, lita:1});
heslika = new Array("basic monsters", "bombs", "boulders", "rock eaters", "wheelers", "jumpers", "ready", "open passage", "closed rock", "empty centre", "open again", "vertex", "disrupted", "rocky right", "divided", "traverse", "small bottom", "hanoy tower", "long shaft", "three gems");
uroven = 1;
system.uroven = uroven;
prachy = 0;
den = 0;
godik = 0;
novaHra = true;
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("e5e5b72f", this, 10301, true);
Frame 3
lo = _root.getBytesLoaded();
if ((!lo) || (lo < _root.getBytesLTotal())) {
prevFrame();
play();
}
Frame 4
zvukDril = new Sound();
zvukDril.attachSound("beepdrop");
zvukPotvora = new Sound();
zvukPotvora.attachSound("polk2");
zvukZlato = new Sound();
zvukZlato.attachSound("click14");
zvukNavrat = new Sound();
zvukNavrat.attachSound("cvak");
zvukVykrik = new Sound();
zvukVykrik.attachSound("squeak");
zvukKoleno = new Sound();
zvukKoleno.attachSound("mc6");
zvukVyhra = new Sound();
zvukVyhra.attachSound("znelka1");
zvukMina = new Sound();
zvukMina.attachSound("explosio");
zvukCas = new Sound();
zvukCas.attachSound("mc9");
zvukTrubka = new Sound();
zvukTrubka.attachSound("deepslam");
zvukKamen = new Sound();
zvukKamen.attachSound("tunk");
zvukHudba1 = new Sound();
zvukHudba1.attachSound("hudba1");
Frame 55
_root.zvukHudba1.start(0, 10);
Frame 56
stop();
Frame 61
_root.zvukHudba1.stop();
Frame 62
okoli.hlaska.gotoAndStop(1);
helpik._visible = true;
helpik.redy = true;
helpik.nadpis = (("lvl " + uroven) + " - ") + heslika[uroven - 1];
helpik.gotoAndStop("L" + uroven);
system.gotoAndStop(2);
Instance of Symbol 264 MovieClip in Frame 62
onClipEvent (load) {
}
Frame 69
stop();
Frame 70
prevFrame();
Frame 78
ziv = system.zivotu;
Frame 79
if (okoli._currentframe == 1) {
okoli.gotoAndStop(2);
} else {
okoli.gotoAndStop(1);
}
gotoAndPlay ("novaUroven");
Symbol 44 MovieClip Frame 7
if (!random(2)) {
gotoAndPlay (1);
}
Instance of Symbol 44 MovieClip "v2" in Symbol 47 MovieClip Frame 1
onClipEvent (enterFrame) {
gotoAndStop(_parent.v1._currentframe);
}
Symbol 52 MovieClip Frame 68
_parent.play();
Symbol 52 MovieClip Frame 104
_parent.play();
Symbol 52 MovieClip Frame 147
stop();
Symbol 82 MovieClip Frame 1
stop();
Symbol 83 MovieClip Frame 13
gotoAndPlay ("pohyb");
Symbol 83 MovieClip Frame 14
_parent.utoci = 1;
Symbol 83 MovieClip Frame 16
if (random(2)) {
gotoAndPlay ("vypad");
}
Symbol 83 MovieClip Frame 21
_parent.utoci = 2;
Symbol 83 MovieClip Frame 22
_parent.utoci = 1;
Symbol 83 MovieClip Frame 25
_parent.utoci = 0;
Symbol 83 MovieClip Frame 26
gotoAndPlay ("pohyb");
Symbol 83 MovieClip Frame 27
_parent.utoci = -1;
Symbol 83 MovieClip Frame 30
_parent._parent.odstranPotvoru(_parent.cislo);
stop();
Symbol 90 Button
on (release) {
_root.klik();
nextFrame();
}
Symbol 92 Button
on (release) {
_root.klik();
prevFrame();
}
Symbol 94 Button
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
gotoAndStop (1);
}
on (release) {
_root.klik();
var x;
var te = levelName.text.toLowerCase();
x = 0;
while (x < _root.heslika.length) {
if (te == _root.heslika[x]) {
break;
}
x++;
}
if (x < _root.heslika.length) {
_root.tracking();
_root.novaHra = true;
_root.uroven = x + 1;
_root.gotoAndPlay("hraj");
} else {
if (te == "iwannabegod") {
_root.godik = 1;
}
_parent.gotoAndStop(1);
}
}
Symbol 100 MovieClip Frame 1
levelName.restrict = " a-z,A-Z,0-9,-";
stop();
Symbol 104 Button
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
gotoAndStop (1);
}
on (release) {
getURL ("http://www.thunderbird.cz/", "_blank");
}
Symbol 112 MovieClip Frame 1
stop();
Symbol 114 MovieClip Frame 1
stop();
Symbol 115 MovieClip Frame 1
stop();
Symbol 123 MovieClip Frame 1
skret.stop();
stop();
Symbol 130 Button
on (rollOver) {
_parent._parent.klik();
gotoAndStop ("how");
}
on (rollOut) {
gotoAndStop ("normal");
}
on (release) {
_parent._parent.klik();
_parent.doupe.gotoAndStop("uvod");
}
Symbol 131 Button
on (rollOver) {
_parent._parent.klik();
gotoAndStop ("lets");
}
on (rollOut) {
gotoAndStop ("normal");
}
on (release) {
_root.tracking();
_parent._parent.klik();
_root.novaHra = true;
_root.uroven = 1;
_root.gotoAndPlay("hraj");
}
Symbol 132 Button
on (rollOver) {
_parent._parent.klik();
gotoAndStop ("more");
}
on (rollOut) {
gotoAndStop ("normal");
}
on (release) {
_parent._parent.klik();
getURL ("http://www.gamegarage.co.uk", "_blank");
}
Symbol 133 Button
on (rollOver) {
_parent._parent.klik();
gotoAndStop ("pswd");
}
on (rollOut) {
gotoAndStop ("normal");
}
on (release) {
_parent._parent.klik();
_parent.doupe.gotoAndStop("password");
}
Symbol 134 Button
on (rollOver) {
_parent._parent.klik();
gotoAndStop ("credits");
}
on (rollOut) {
gotoAndStop ("normal");
}
on (release) {
_parent._parent.klik();
_parent.doupe.gotoAndStop("credits");
}
Symbol 135 Button
on (rollOver) {
_parent._parent.klik();
gotoAndStop ("hints");
}
on (rollOut) {
gotoAndStop ("normal");
}
on (release) {
_parent._parent.klik();
_parent.doupe.gotoAndStop("hints");
}
Symbol 136 MovieClip Frame 24
stop();
Symbol 137 Button
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
gotoAndStop (1);
}
on (release) {
getURL ("http://www.gamegarage.co.uk", "_blank");
}
Symbol 139 MovieClip Frame 1
stop();
Symbol 140 MovieClip Frame 10
stop();
Symbol 141 MovieClip Frame 1
stop();
Symbol 141 MovieClip Frame 9
stop();
Symbol 141 MovieClip Frame 56
stop();
Symbol 144 MovieClip Frame 1
stop();
Symbol 152 MovieClip Frame 2
posunu = random(6) + 1;
hraje = 0;
stop();
Symbol 152 MovieClip Frame 3
hraje = 1;
Symbol 152 MovieClip Frame 12
posunu--;
if (posunu > 0) {
gotoAndPlay ("pohyb");
}
Symbol 156 MovieClip Frame 2
hraje = 0;
stop();
Symbol 156 MovieClip Frame 3
hraje = 1;
Symbol 162 MovieClip Frame 1
stop();
Symbol 162 MovieClip Frame 12
stop();
Symbol 162 MovieClip Frame 24
stop();
Symbol 162 MovieClip Frame 36
stop();
Symbol 162 MovieClip Frame 45
stop();
Symbol 162 MovieClip Frame 53
stop();
Symbol 162 MovieClip Frame 64
stop();
Symbol 165 MovieClip Frame 1
hraje = 0;
oblaku = random(5) + 1;
stop();
Symbol 165 MovieClip Frame 2
hraje = 1;
Symbol 165 MovieClip Frame 21
oblaku--;
if (oblaku > 0) {
gotoAndPlay ("oblak");
}
Symbol 166 MovieClip Frame 1
function delejNeco(jak) {
r = random(2);
if (jak) {
r = r + 2;
}
switch (r) {
case 0 :
casomer.play();
break;
case 1 :
if (!vyfuk.hraje) {
vyfuk.play();
}
break;
case 2 :
if (!trp1.hraje) {
trp1.play();
}
break;
case 3 :
if (trp2.hraje) {
break;
}
trp2.play();
}
}
Symbol 166 MovieClip Frame 17
if (random(2)) {
gotoAndPlay ("konec");
}
Symbol 166 MovieClip Frame 25
delejNeco();
Symbol 169 Button
on (release) {
_parent._parent._parent.prachy = 0;
_root.skore = 0;
_root.novaHra = true;
_parent._parent._parent.play();
}
Symbol 174 Button
on (release) {
_parent._parent._parent.stat.cas.gotoAndPlay("uctuj");
}
Symbol 177 Button
on (release) {
if (_parent._parent._parent.prachy >= _parent._parent._parent.cenaOpravy) {
_parent._parent._parent.prachy = _parent._parent._parent.prachy - _parent._parent._parent.cenaOpravy;
_parent._parent._parent.system.zivotu++;
_parent._parent._parent.zvukKoleno.start();
if (_parent._parent._parent.system.zivotu >= _parent._parent._parent.maxZiv) {
play();
}
} else {
_parent._parent._parent.zvukDril.start();
}
}
Symbol 178 Button
on (release) {
play();
}
Symbol 182 Button
on (release) {
if (_root.prachy >= cena1) {
_root.prachy = _root.prachy - cena1;
_root.maxZiv++;
_root.system.zivotu++;
_root.zvukKoleno.start();
cena1 = _root.urciCenuVylepseni();
cena = ("(" + cena1) + ")";
if (_root.prachy < cena1) {
play();
}
} else {
_root.zvukDril.start();
}
}
Symbol 183 Button
on (release) {
_root.novaHra = false;
_root.novaUroven();
}
Symbol 186 Button
on (release) {
_root.novaHra = false;
_root.novaUroven();
}
Symbol 189 MovieClip Frame 1
stop();
Symbol 189 MovieClip Frame 3
_root.helpik._visible = true;
_root.helpik.gotoAndStop("congrats");
Symbol 189 MovieClip Frame 4
if (_parent._parent._parent.system.zivotu >= _parent._parent._parent.maxZiv) {
play();
} else {
cena = ("(" + _parent._parent._parent.cenaOpravy) + ")";
stop();
}
Symbol 189 MovieClip Frame 5
cena1 = _root.urciCenuVylepseni();
cena = ("(" + cena1) + ")";
if (cena1 <= _root.prachy) {
stop();
} else {
play();
}
Symbol 189 MovieClip Frame 6
stop();
Symbol 190 MovieClip Frame 1
stop();
Symbol 190 MovieClip Frame 3
switch (typ) {
case 1 :
_parent._parent.zvukVykrik.start();
break;
case 2 :
_parent._parent.zvukVyhra.start();
}
Symbol 190 MovieClip Frame 8
textik.gotoAndStop(typ);
Symbol 190 MovieClip Frame 12
stop();
Symbol 196 MovieClip Frame 1
stop();
Symbol 197 MovieClip Frame 1
function nahlas(cislo) {
if (!cislo) {
hlaska.gotoAndStop(1);
}
hlaska.typ = cislo;
hlaska.gotoAndPlay(2);
}
stop();
Symbol 197 MovieClip Frame 2
mesic.gotoAndStop(_root.den + 1);
stop();
Symbol 211 MovieClip Frame 1
if (_parent.stoji) {
gotoAndStop (2);
_parent.stoji = 0;
} else {
gotoAndPlay ("hod");
}
Symbol 211 MovieClip Frame 7
gotoAndStop (2);
Symbol 212 MovieClip Frame 1
gotoAndStop(typ);
Symbol 215 MovieClip Frame 1
stop();
Symbol 217 MovieClip Frame 1
Symbol 217 MovieClip Frame 12
gotoAndPlay ("pohyb");
Symbol 217 MovieClip Frame 13
_parent.utoci = 1;
Symbol 217 MovieClip Frame 14
if (random(3)) {
gotoAndPlay ("vypad");
}
Symbol 217 MovieClip Frame 20
_parent.utoci = 2;
Symbol 217 MovieClip Frame 21
_parent.utoci = 1;
Symbol 217 MovieClip Frame 26
_parent.utoci = 0;
Symbol 217 MovieClip Frame 27
gotoAndPlay ("pohyb");
Symbol 217 MovieClip Frame 28
_parent._parent.odstranPotvoru(_parent.cislo);
Symbol 217 MovieClip Frame 31
stop();
Symbol 217 MovieClip Frame 32
_parent.utoci = -1;
Symbol 217 MovieClip Frame 35
_parent._parent.odstranPotvoru(_parent.cislo);
stop();
Symbol 222 MovieClip Frame 3
gotoAndPlay ("chuze");
Symbol 222 MovieClip Frame 4
Symbol 222 MovieClip Frame 5
_parent.utoci = 2;
Symbol 222 MovieClip Frame 6
_parent.utoci = -1;
Symbol 222 MovieClip Frame 7
_parent._parent.odstranPotvoru(_parent.cislo);
stop();
Symbol 229 MovieClip Frame 13
gotoAndPlay ("pohyb");
Symbol 229 MovieClip Frame 14
_parent.utoci = 1;
Symbol 229 MovieClip Frame 16
if (random(2)) {
gotoAndPlay ("vypad");
}
Symbol 229 MovieClip Frame 21
_parent.utoci = 2;
Symbol 229 MovieClip Frame 22
_parent.utoci = 1;
Symbol 229 MovieClip Frame 25
_parent.utoci = 0;
Symbol 229 MovieClip Frame 26
gotoAndPlay ("pohyb");
Symbol 229 MovieClip Frame 27
_parent.utoci = -1;
Symbol 229 MovieClip Frame 30
_parent._parent.odstranPotvoru(_parent.cislo);
stop();
Symbol 232 MovieClip Frame 1
stop();
Symbol 235 MovieClip Frame 16
gotoAndPlay ("pohyb");
Symbol 235 MovieClip Frame 17
_parent.utoci = 1;
Symbol 235 MovieClip Frame 19
if (random(2)) {
gotoAndPlay ("vypad");
}
Symbol 235 MovieClip Frame 23
hlava.gotoAndStop(2);
Symbol 235 MovieClip Frame 24
_parent.utoci = 2;
Symbol 235 MovieClip Frame 25
_parent.utoci = 1;
hlava.gotoAndStop(1);
Symbol 235 MovieClip Frame 28
_parent.utoci = 0;
Symbol 235 MovieClip Frame 29
gotoAndPlay ("pohyb");
Symbol 235 MovieClip Frame 30
_parent.utoci = -1;
Symbol 235 MovieClip Frame 33
_parent._parent.odstranPotvoru(_parent.cislo);
stop();
Symbol 242 MovieClip Frame 13
gotoAndPlay ("pohyb");
Symbol 242 MovieClip Frame 14
_parent.utoci = 1;
Symbol 242 MovieClip Frame 16
if (random(2)) {
gotoAndPlay ("vypad");
}
Symbol 242 MovieClip Frame 21
_parent.utoci = 2;
Symbol 242 MovieClip Frame 22
_parent.utoci = 1;
Symbol 242 MovieClip Frame 25
_parent.utoci = 0;
Symbol 242 MovieClip Frame 26
gotoAndPlay ("pohyb");
Symbol 242 MovieClip Frame 27
_parent.utoci = -1;
Symbol 242 MovieClip Frame 30
_parent._parent.odstranPotvoru(_parent.cislo);
stop();
Symbol 243 MovieClip Frame 1
function trubkoZrout() {
return(_root.typyPotvor[typ].skodi > 1);
}
function zmenaPolohy() {
posX = Math.floor((xMaly + (_parent.dilek / 2)) / _parent.dilek);
if (!(xMaly % dilek)) {
return(1);
}
}
function testujTrubku() {
var _local2;
if (_parent.konec) {
return(0);
}
_local2 = 0;
if (!_parent.jeKrizovatka(posX + _local2, posY)) {
return(0);
}
if (_parent.jeTrubka(posX + _local2, posY)) {
return(1);
}
return(0);
}
function testujPotvoru() {
var _local4;
var _local5;
var _local7;
var _local6;
_local6 = 0;
_local7 = posY;
_local5 = 0;
while (_local5 < _parent.potvory.length) {
_local4 = _parent.potvory[_local5];
if ((((((_local4.posX == (this.posX + _local6)) && (_local4.posY == this.posY)) && (_root.typyPotvor[_local4.typ].skodi != 1)) && (_local4._xscale != _xscale)) && (_local4.utoci != -1)) && (!smerLetu)) {
return(_local4);
}
_local5++;
}
return(0);
}
function kousniPotvoru(p) {
if (!p._xscale) {
return(0);
}
p.zivotu = p.zivotu - _parent._parent.typyPotvor[typ].sila;
if (p.zivotu <= 0) {
_parent._parent.zvukPotvora.start();
p.potvora.gotoAndPlay("smrt");
trace(((("Potvora " + p.cislo) + " sezrana potvorou ") + this.cislo) + ":");
}
}
this.onEnterFrame = function () {
var _local7;
var _local5;
if (this.mizeni) {
_local5 = this._alpha - (this.mizeni * 34);
this._alpha = _local5;
if (_local5 >= 100) {
this.mizeni = 0;
}
if (_local5 <= 0) {
trace(("Potvora " + this.cislo) + " odesla:");
_parent.odstranPotvoru(this.cislo);
}
}
if ((!_parent.povoleno(this)) && (posX != startX)) {
this.mizeni = 1;
}
if ((utoci == 1) || (_parent.zastaveno)) {
return(0);
}
if (!utoci) {
_x = (_x + rychlost);
xMaly = xMaly + rychlost;
if (zmenaPolohy()) {
if (testujTrubku()) {
potvora.gotoAndPlay("utok");
}
if (smerLetu) {
yMaly = yMaly + ((smerLetu * _parent.vyskaPatra) / 4);
_y = (_y + ((smerLetu * _parent.vyskaPatra) / 4));
posY = Math.round(yMaly / _parent.vyskaPatra);
if (_parent.spravnaPolohaY(yMaly)) {
smerLetu = 0;
}
}
if (_root.typyPotvor[typ].lita) {
var _local6 = 0;
var _local4 = _root.typyPotvor[typ].lita;
if (_local4 > 0) {
_local6 = -1;
}
if (((posY - _local4) > 0) && ((posY - _local4) < 8)) {
if (_parent.povoleno(this, (-_local4) + 2) && (!_parent.vecVsachte(posX, posY + _local6))) {
smerLetu = -_local4;
}
}
}
if (testujPotvoru()) {
potvora.gotoAndPlay("utok");
}
if (((_parent.typPokladuNa(posX, posY) == _parent.SUTR) && (xPoslednihoSutru != posX)) && (!_parent.vecVsachte(posX, posY))) {
if (!_root.typyPotvor[this.typ].sutry) {
rychlost = -rychlost;
_xscale = (-_xscale);
xPoslednihoSutru = posX;
} else {
zereKamen = true;
potvora.gotoAndPlay("utok");
}
}
}
}
if (utoci == 2) {
if (_root.typyPotvor[typ].sutry && (zereKamen)) {
zereKamen = false;
_parent[(("z" + posY) + "_") + (posX + 20)].removeMovieClip();
} else if (trubkoZrout()) {
if (testujTrubku()) {
_parent.oslabTrubku(_parent._parent.typyPotvor[typ].sila);
} else {
kousniPotvoru(testujPotvoru());
}
} else {
_parent.oslabTrubku(_parent._parent.typyPotvor[typ].sila);
utoci = -1;
}
}
};
gotoAndStop(typ);
Symbol 243 MovieClip Frame 2
potvora.hlava.gotoAndStop(2);
Symbol 243 MovieClip Frame 4
potvora.hlava.gotoAndStop(2);
Symbol 250 MovieClip Frame 1
stop();
Symbol 255 MovieClip Frame 1
stop();
Symbol 257 MovieClip Frame 1
stop();
Symbol 258 MovieClip Frame 3
roura._height = _parent.zacRoura;
roura._alpha = 100;
_parent.reaguje = 1;
Symbol 258 MovieClip Frame 5
stop();
Instance of Symbol 257 MovieClip "zrout" in Symbol 258 MovieClip Frame 5
onClipEvent (load) {
_y = (_parent.roura._height + 9);
}
onClipEvent (enterFrame) {
_y = (_parent.roura._height + 9);
}
Symbol 258 MovieClip Frame 10
stop();
Symbol 258 MovieClip Frame 15
this.removeMovieClip();
Symbol 263 MovieClip Frame 1
function povoleno(komu, smer) {
var _local4 = 0;
var _local7;
if (!smer) {
if ((komu.posX < -25) || (komu.posX > 25)) {
return(0);
}
var _local5 = this["mezery" + uroven][komu.posY - 1];
var _local3 = 0;
while (_local3 < _local5.length) {
if ((_local5[_local3] <= komu.posX) && (_local5[_local3 + 1] >= komu.posX)) {
return(0);
}
_local3 = _local3 + 2;
}
return(1);
}
switch (smer) {
case 1 :
if (komu.posY < 1) {
break;
}
if (komu.posY < 2) {
if (komu.posX == 0) {
_local4 = 1;
}
}
if ((komu == this) && (!spravnaPolohaX(komu.xMaly))) {
_local4 = 0;
} else {
_local7 = komu.posY - 1;
var _local6 = this["sachty" + uroven][_local7];
cyk = 0;
while (cyk < _local6.length) {
if (_local6[cyk] == komu.posX) {
_local4 = 1;
}
cyk++;
}
break;
if (komu.posY < 1) {
} else {
if (spravnaPolohaY(komu.yMaly) && ((komu != this) || (komu.posX < 20))) {
_local4 = 1;
var _local5 = this["mezery" + uroven][komu.posY - 1];
var _local3 = 0;
while (_local3 < _local5.length) {
if ((_local5[_local3] <= komu.posX) && (_local5[_local3 + 1] > komu.posX)) {
_local4 = 0;
break;
}
_local3 = _local3 + 2;
}
}
break;
if ((komu == this) && (!spravnaPolohaX(komu.xMaly))) {
_local4 = 0;
} else if (komu.posY < 1) {
_local4 = 1;
} else {
_local7 = komu.posY - 0;
_local6 = this["sachty" + uroven][_local7];
cyk = 0;
while (cyk < _local6.length) {
if (_local6[cyk] == komu.posX) {
_local4 = 1;
}
cyk++;
}
break;
if (komu.posY < 1) {
} else {
if (!(spravnaPolohaY(komu.yMaly) && ((komu != this) || (komu.posX > -19)))) {
break;
}
_local4 = 1;
var _local5 = this["mezery" + uroven][komu.posY - 1];
var _local3 = 0;
for(;;){
if (_local3 >= _local5.length) {
break;
}
if ((_local5[_local3 + 1] >= komu.posX) && (_local5[_local3] < posX)) {
_local4 = 0;
break;
}
_local3 = _local3 + 2;
};
}
}
}
}
case 2 :
if (komu.posY < 1) {
} else {
if (spravnaPolohaY(komu.yMaly) && ((komu != this) || (komu.posX < 20))) {
_local4 = 1;
var _local5 = this["mezery" + uroven][komu.posY - 1];
var _local3 = 0;
while (_local3 < _local5.length) {
if ((_local5[_local3] <= komu.posX) && (_local5[_local3 + 1] > komu.posX)) {
_local4 = 0;
break;
}
_local3 = _local3 + 2;
}
}
break;
if ((komu == this) && (!spravnaPolohaX(komu.xMaly))) {
_local4 = 0;
} else if (komu.posY < 1) {
_local4 = 1;
} else {
_local7 = komu.posY - 0;
var _local6 = this["sachty" + uroven][_local7];
cyk = 0;
while (cyk < _local6.length) {
if (_local6[cyk] == komu.posX) {
_local4 = 1;
}
cyk++;
}
break;
if (komu.posY < 1) {
} else {
if (!(spravnaPolohaY(komu.yMaly) && ((komu != this) || (komu.posX > -19)))) {
break;
}
_local4 = 1;
var _local5 = this["mezery" + uroven][komu.posY - 1];
var _local3 = 0;
for(;;){
if (_local3 >= _local5.length) {
break;
}
if ((_local5[_local3 + 1] >= komu.posX) && (_local5[_local3] < posX)) {
_local4 = 0;
break;
}
_local3 = _local3 + 2;
};
}
}
}
case 3 :
if ((komu == this) && (!spravnaPolohaX(komu.xMaly))) {
_local4 = 0;
} else if (komu.posY < 1) {
_local4 = 1;
} else {
_local7 = komu.posY - 0;
var _local6 = this["sachty" + uroven][_local7];
cyk = 0;
while (cyk < _local6.length) {
if (_local6[cyk] == komu.posX) {
_local4 = 1;
}
cyk++;
}
break;
if (komu.posY < 1) {
} else {
if (!(spravnaPolohaY(komu.yMaly) && ((komu != this) || (komu.posX > -19)))) {
break;
}
_local4 = 1;
var _local5 = this["mezery" + uroven][komu.posY - 1];
var _local3 = 0;
for(;;){
if (_local3 >= _local5.length) {
break;
}
if ((_local5[_local3 + 1] >= komu.posX) && (_local5[_local3] < posX)) {
_local4 = 0;
break;
}
_local3 = _local3 + 2;
};
}
}
case 4 :
if (komu.posY < 1) {
} else {
if (!(spravnaPolohaY(komu.yMaly) && ((komu != this) || (komu.posX > -19)))) {
break;
}
_local4 = 1;
var _local5 = this["mezery" + uroven][komu.posY - 1];
var _local3 = 0;
for(;;){
if (_local3 >= _local5.length) {
break;
}
if ((_local5[_local3 + 1] >= komu.posX) && (_local5[_local3] < posX)) {
_local4 = 0;
break;
}
_local3 = _local3 + 2;
};
}
}
return(_local4);
}
function zpracujKlavesy() {
var _local5;
var _local4 = new Object();
if (konec == 1) {
return(0);
}
if (naprahNaSutr) {
naprahNaSutr--;
}
if (Key.isDown(27) && (!esteNesmiZastavit)) {
if (!zastaveno) {
zastaveno = -1;
zastavCas(-1);
} else {
zastaveno = 0;
zastavCas(0);
}
esteNesmiZastavit = 10;
}
if (esteNesmiZastavit) {
esteNesmiZastavit--;
}
if (zastaveno < 0) {
return(0);
}
if (Key.isDown(37)) {
dalsi2 = 4;
} else if (Key.isDown(39)) {
dalsi2 = 2;
}
if (Key.isDown(38)) {
dalsi1 = 1;
} else if (Key.isDown(40)) {
dalsi1 = 3;
}
if ((posledniDotek < 1) && (Key.isDown(32))) {
if (posX || (posY)) {
_parent.zvukNavrat.start();
dalsi1 = -1;
}
}
if ((Key.isDown(17) && (sutru > 0)) && (!naprahNaSutr)) {
naprahNaSutr = 4;
var _local3 = 0;
if (smer == 4) {
_local3 = -1;
} else {
_local3 = 1;
}
_local4.posX = posX + _local3;
_local4.posY = posY;
if (povoleno(_local4)) {
zer(posX + _local3, posY);
hodPoklad(posX, posY, SUTR, _local3);
sutru--;
_root.zvukKamen.start();
}
}
if (konec == 2) {
_parent.zvukNavrat.start();
dalsi1 = -1;
}
if (dalsi1 == -1) {
krok = 2 * rychlost;
testujSmer(dalsi1);
} else {
krok = rychlost;
if (!testujSmer(dalsi1)) {
if (!testujSmer(dalsi2)) {
if ((posledni && (posledni != dalsi1)) && (posledni != dalsi2)) {
testujSmer(posledni);
}
}
}
}
posledniDotek = dalsi1;
if (!dalsi1) {
posledniDotek = dalsi2;
}
dalsi1 = 0;
dalsi2 = 0;
}
function vztahSmeru(s1, s2) {
if (s1 == s2) {
return(0);
}
if (((s2 - s1) == 1) || ((s2 - s1) == -3)) {
return(1);
}
if (((s1 - s2) == 1) || ((s1 - s2) == -3)) {
return(-1);
}
return(2);
}
function zmenaPolohy(smer) {
var _local5 = posX;
var _local4 = posY;
var _local2 = xMaly;
var _local3 = yMaly;
if (smer == 2) {
posX = Math.floor(_local2 / dilek);
} else if (smer == 4) {
posX = Math.ceil(_local2 / dilek);
} else if (smer == 3) {
posY = Math.floor(_local3 / vyskaPatra);
} else if (smer == 1) {
posY = Math.ceil(_local3 / vyskaPatra);
}
if (_local5 != posX) {
xMaly = posX * dilek;
return(1);
}
if (_local4 != posY) {
yMaly = posY * vyskaPatra;
return(2);
}
return(0);
}
function spravnaPolohaX(xM) {
if ((xM % dilek) == 0) {
return(1);
}
return(0);
}
function spravnaPolohaY(yM) {
if ((yM % vyskaPatra) == 0) {
return(2);
}
return(0);
}
function testujSmer(kolik) {
if (!kolik) {
return(0);
}
if (kolik == -1) {
kolik = smer + 2;
if (kolik > 4) {
kolik = kolik - 4;
}
}
var _local5 = vztahSmeru(kolik, smer);
if (((_local5 == 1) || (_local5 == -1)) && (trubek >= _root.maxTrubek)) {
return(0);
}
if (!povoleno(this, kolik)) {
return(0);
}
var _local7;
switch (kolik) {
case 1 :
yMaly = yMaly - krok;
break;
case 2 :
xMaly = xMaly + krok;
break;
case 3 :
yMaly = yMaly + krok;
break;
case 4 :
xMaly = xMaly - krok;
}
if (zmenaPolohy(kolik)) {
if (dalsi == posledni) {
dalsi = 0;
}
posledni = 0;
zer(posX, posY);
} else {
posledni = kolik;
}
if ((kolik == 1) || (kolik == 3)) {
if (spravnaPolohaY(yMaly)) {
posledni = 0;
dalsi = 0;
}
}
if ((kolik == 2) || (kolik == 4)) {
if (spravnaPolohaX(xMaly)) {
posledni = 0;
dalsi = 0;
}
}
if (!_local5) {
this["t" + trubek].delkaRoury = this["t" + trubek].delkaRoury + krok;
this["t" + trubek].zrout.play();
}
if (_local5 == 2) {
if (this["t" + trubek].delkaRoury > ((zacRoura + krok) - 1)) {
this["t" + trubek].delkaRoury = this["t" + trubek].delkaRoury - krok;
} else if ((trubek > 1) && (!posledni)) {
zaznamTrubky(posX, posY, -1);
_parent.zvukKoleno.start();
this["t" + trubek].removeMovieClip();
trubek--;
smer = this["t" + trubek].smer;
this["t" + trubek].gotoAndStop("zer");
if (kolik > 0) {
kolik = 0;
}
if ((trubek < 2) && (konec == 2)) {
konecUrovne();
}
_parent.okoli.stroj.delejNeco(1);
}
}
if ((_local5 == 1) || (_local5 == -1)) {
zaznamTrubky(posX, posY, 1);
_parent.zvukKoleno.start();
this["t" + trubek].gotoAndStop("stuj");
trubek++;
var _local6 = 1;
if ((smer == 1) || (smer == 4)) {
_local6 = -1;
}
t1.duplicateMovieClip("t" + trubek, trubek + 2000);
if ((smer == 1) || (smer == 3)) {
this["t" + trubek]._x = this["t" + (trubek - 1)]._x;
this["t" + trubek]._y = this["t" + (trubek - 1)]._y + (_local6 * (this["t" + (trubek - 1)]._height + 2));
} else {
this["t" + trubek]._y = this["t" + (trubek - 1)]._y;
this["t" + trubek]._x = this["t" + (trubek - 1)]._x + (_local6 * (this["t" + (trubek - 1)]._width + 2));
}
this["t" + trubek]._rotation = this["t" + (trubek - 1)]._rotation - (90 * _local5);
this["t" + trubek]._xscale = -100 * _local5;
this["t" + trubek].delkaRoury = zacRoura;
this["t" + trubek].smer = kolik;
_parent.okoli.stroj.delejNeco(1);
smer = kolik;
}
this["t" + trubek].roura._height = Math.max(this["t" + trubek].delkaRoury, krok);
}
function kontrolaPadu(x, y) {
var _local2 = this[(("z" + y) + "_") + (x + 20)];
if (vecVsachte(x, y)) {
_local2._y = _local2._y + (_local2._height * 1.5);
}
}
function vecVsachte(x, y) {
if ((jeKrizovatka(x, y) == 2) && (this[(("z" + y) + "_") + (x + 20)].typ == SUTR)) {
return(1);
}
return(0);
}
function hodPoklad(x, y, typ, smerHodu) {
if (!smerHodu) {
smerHodu = 0;
}
x = x + smerHodu;
s = (("z" + y) + "_") + (x + 20);
z0.duplicateMovieClip(s, (100 + ((y - 1) * 50)) + (x + 20));
this[s].typ = typ;
this[s]._y = (t1._y + (y * vyskaPatra)) + 18;
this[s]._x = t1._x + (x * dilek);
kontrolaPadu(x, y);
if (smerHodu) {
this[s].stoji = 0;
if (smerHodu < 0) {
this[s]._xscale = -100;
} else {
this[s]._xscale = 100;
}
} else {
this[s].stoji = 1;
this[s]._xscale = 100;
}
if (typ == DIAMANT) {
pokladu++;
}
}
function rozestel(urov) {
z0._visible = false;
var _local6;
var _local7;
var _local3;
var _local11;
var _local5;
var _local12 = 0;
var _local4;
var _local9 = new Object();
_local7 = 1;
while (_local7 <= 7) {
_local6 = -20;
for ( ; _local6 <= 20 ; _local6++) {
var _local8 = random(20 + (_local7 * (urov + 1)));
_local4 = 0;
_local5 = this["sutry" + urov];
_local3 = 0;
while (_local3 < _local5.length) {
if ((_local5[_local3] == _local6) && (_local5[_local3 + 1] == _local7)) {
_local4 = SUTR;
}
_local3 = _local3 + 2;
}
if (_local4 != SUTR) {
this._parent;
}
_local5 = this["diamanty" + urov];
_local3 = 0;
while (_local3 < _local5.length) {
if ((_local5[_local3] == _local6) && (_local5[_local3 + 1] == _local7)) {
_local4 = DIAMANT;
}
_local3 = _local3 + 2;
}
if ((_local8 >= 10) || (_local4)) {
if (!_local4) {
_local4 = Math.floor(_local8 / 20);
if (_local4 > 4) {
_local4 = 4;
}
if (_local4 < 1) {
continue;
}
} else {
_local9.posX = _local6;
_local9.posY = _local7;
if (!povoleno(_local9, 0)) {
} else {
hodPoklad(_local6, _local7, _local4);
celkovaCena = celkovaCena + _root.ceny[this[_local11]._currentframe];
}
}
}
}
_local7++;
}
_local11 = random(4);
if (!_local11) {
return(celkovaCena);
}
_local6 = random(30) - 15;
_local7 = random(3) + 5;
_local11 = (("z" + _local7) + "_") + (_local6 + 20);
if (typPokladuNa(_local6, _local7) < 5) {
this[_local11].typ = 6;
}
this[_local11].gotoAndStop(this[_local11].typ);
return(celkovaCena);
}
function zer(x, y) {
var _local4 = this[(("z" + y) + "_") + (x + 20)];
if (!_local4.typ) {
return(0);
}
if (_local4.typ == DIAMANT) {
pokladu--;
if (pokladu < 1) {
konecUrovne();
}
}
if (_local4.typ != 6) {
_parent.zvukZlato.start();
if (_local4.typ == SUTR) {
sutru++;
_root.zvukKamen.start();
} else {
berPrachy(_root.ceny[_local4._currentframe]);
}
_local4.removeMovieClip();
} else {
_parent.zvukCas.start();
zastavCas(1);
_local4.removeMovieClip();
}
}
function berPrachy(kolik) {
_root.prachy = _root.prachy + kolik;
_root.skore = _root.skore + kolik;
}
function zaznamTrubky(x, y, kolik) {
this[(("k" + y) + "_") + (x + 20)] = this[(("k" + y) + "_") + (x + 20)] + kolik;
}
function jeKrizovatka(x, y) {
var _local8;
var _local2;
if (y < 1) {
return(0);
}
_local8 = y;
var _local7 = this["sachty" + uroven];
var _local4;
if (y > 1) {
_local4 = _local7[y - 1];
}
var _local3 = _local7[y];
_local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2] == x) {
return(2);
}
_local2++;
}
_local2 = 0;
while (_local2 < _local4.length) {
if (_local4[_local2] == x) {
return(1);
}
_local2++;
}
return(0);
}
function jeTrubka(x, y) {
return(this[(("k" + y) + "_") + (x + 20)]);
}
function oslabTrubku(kolik) {
var _local4;
_local4 = 1;
while (_local4 < trubek) {
this["t" + _local4].gotoAndPlay("otres");
_local4++;
}
_parent.zvukTrubka.start();
if (!_root.godik) {
zivotu = zivotu - kolik;
}
if (zivotu <= 0) {
zivotu = 0;
gameOver();
}
}
function vycisti(novaHra) {
var _local4;
var _local5;
_local5 = 1;
while (_local5 < 8) {
_local4 = 0;
while (_local4 < 40) {
if (jeKrizovatka(_local4 - 20, _local5)) {
this[(("k" + _local5) + "_") + _local4] = 0;
}
_local4++;
}
_local5++;
}
_local4 = 1;
while (_local4 < trubek) {
this["t" + _local4].removeMovieClip();
_local4++;
}
trubek = 1;
if (_root.novaHra) {
_parent.maxZiv = 4 + Math.floor(_root.uroven / 5);
zivotu = _parent.maxZiv;
_root.prachy = 0;
} else {
zivotu = _parent.ziv;
}
zastaveno = 0;
pokladu = 0;
naprahNaSutr = 0;
konec = 0;
t1.smer = 3;
t1.delkaRoury = zacRoura;
smer = 3;
posun = 0;
posledni = 0;
cekejNaStvoreni = 0;
sutru = 0;
posX = 0;
posY = 0;
xMaly = 0;
yMaly = 0;
mezer = 0;
cisloPotvory = 0;
var _local7 = potvory.length;
var _local6;
_local4 = 0;
while (_local4 < _local7) {
potvory[_local4].removeMovieClip();
potvory.pop();
_local4++;
}
_local5 = 1;
while (_local5 <= 7) {
_local4 = -20;
while (_local4 <= 20) {
_local6 = this[(("z" + _local5) + "_") + (_local4 + 20)];
if (_local6._visible) {
_local6.removeMovieClip();
}
_local4++;
}
_local5++;
}
_local4 = 1;
while (_local4 <= mezer) {
this["m" + _local4].removeMovieClip();
_local4++;
}
mezer = 0;
_local4 = 1;
while (_local4 <= sachet) {
this["s" + _local4].removeMovieClip();
_local4++;
}
sachet = 0;
}
function typPokladuNa(x, y) {
var _local2 = this[(("z" + y) + "_") + (x + 20)];
if (_local2._visible) {
return(_local2.typ);
}
return(0);
}
function stvorSachtu(x, y) {
var _local2 = new Object();
sachet++;
_local2 = s0.duplicateMovieClip("s" + sachet, this.getNextHighestDepth());
_local2._y = s0._y + (vyskaPatra * y);
_local2._x = t1._x + (dilek * x);
}
function nakresliSachty() {
var _local2;
var _local3;
var _local5 = this["sachty" + uroven];
var _local4;
_local3 = 0;
while (_local3 < _local5.length) {
_local4 = _local5[_local3];
_local2 = 0;
while (_local2 < _local4.length) {
stvorSachtu(_local4[_local2], _local3 - 1);
_local2++;
}
_local3++;
}
}
function stvorMezeru(x1, x2, y) {
var _local2 = new Object();
mezer++;
_local2 = m0.duplicateMovieClip("m" + mezer, this.getNextHighestDepth());
_local2._y = m0._y + (vyskaPatra * y);
_local2._x = t1._x + (dilek * x1);
_local2.stred._x = _local2.d1._width - 1;
_local2.stred._width = ((dilek * (x2 - x1)) - (_local2.d1._width * 2)) + 2;
_local2.d2._x = _local2.stred._x + _local2.stred._width;
}
function nakresliMezery() {
var _local2;
var _local4;
var _local5 = this["mezery" + uroven];
var _local3;
_local4 = 1;
while (_local4 <= _local5.length) {
_local3 = _local5[_local4 - 1];
_local2 = 1;
while (_local2 <= _local3.length) {
stvorMezeru(_local3[_local2 - 1], _local3[_local2], _local4 - 1);
_local2 = _local2 + 2;
}
_local4++;
}
}
function krajniX(patro, smer) {
var _local3;
var _local2 = this["mezery" + uroven][patro - 1];
if (!_local2.length) {
return(smer * -25);
}
if (smer < 0) {
_local3 = _local2[_local2.length - 2] - 1;
} else {
_local3 = _local2[1] + 1;
}
return(_local3);
}
function stvorPotvoru(uroven, nahoda) {
var _local9;
var _local3;
var _local7 = random(7) + 1;
cekejNaStvoreni = random((4 * (MAXUROVEN - uroven)) + 40);
var _local6;
var _local4;
cisloPotvory++;
_local3 = "p" + cisloPotvory;
p0.duplicateMovieClip(_local3, 1000 + cisloPotvory);
if (posledniSmer > 0) {
posledniSmer = -1;
} else {
posledniSmer = 1;
}
_local6 = random(100);
_local4 = 1;
if (_local6 > (72 - Math.floor((72 * (uroven - 1)) / MAXUROVEN))) {
_local4++;
}
if (_local6 > (79 - Math.floor((76 * (uroven - 1)) / MAXUROVEN))) {
_local4++;
}
if (_local6 > (85 - Math.floor((78 * (uroven - 1)) / MAXUROVEN))) {
_local4++;
}
if (_local6 > (90 - Math.floor((79 * (uroven - 1)) / MAXUROVEN))) {
_local4++;
}
if (_local6 > (94 - Math.floor((75 * (uroven - 1)) / MAXUROVEN))) {
_local4++;
}
if (_local6 > (97 - Math.floor((57 * (uroven - 1)) / MAXUROVEN))) {
_local4++;
}
if (_local6 > (100 - Math.floor((24 * (uroven - 1)) / MAXUROVEN))) {
_local4++;
}
if ((uroven < 2) && (_local4 > 4)) {
_local4 = 1;
}
if ((uroven < 4) && (_local4 > 5)) {
_local4 = 1;
}
if ((uroven < 5) && (_local4 > 6)) {
_local4 = 1;
}
if ((uroven < 6) && (_local4 > 7)) {
_local4 = 1;
}
this[_local3].typ = _local4;
this[_local3]._xscale = 100 * posledniSmer;
this[_local3].rychlost = posledniSmer * _parent.typyPotvor[this[_local3].typ].rychlost;
this[_local3].rychlost = this[_local3].rychlost * 1.5;
this[_local3].posY = _local7;
this[_local3]._y = p0._y + ((this[_local3].posY - 1) * vyskaPatra);
this[_local3].yMaly = this[_local3].posY * vyskaPatra;
if (nahoda) {
this[_local3].posX = random(40) - 20;
} else {
this[_local3].posX = -25 * posledniSmer;
}
if (!povoleno(this[_local3])) {
this[_local3].posX = krajniX(_local7, posledniSmer);
}
this[_local3].startX = this[_local3].posX;
this[_local3].xMaly = this[_local3].posX * dilek;
this[_local3]._x = t1._x + this[_local3].xMaly;
this[_local3].zivotu = _parent.typyPotvor[this[_local3].typ].zivoty;
potvory.push(this[_local3]);
this[_local3].cislo = potvory.length - 1;
this[_local3].mizeni = -1;
this[_local3]._alpha = 0;
return(1);
}
function odstranPotvoru(i) {
if (i >= potvory.length) {
return(0);
}
var _local2 = potvory[i];
if (potvory.length > 1) {
potvory[i] = potvory[potvory.length - 1];
potvory[i].cislo = i;
potvory.pop();
_local2.removeMovieClip();
}
}
function testujPotvory() {
var _local1;
var _local4;
var _local6;
var _local5;
if (smer == 3) {
_local4 = Math.ceil(posY);
_local5 = 1;
} else {
_local4 = Math.floor(posY);
_local5 = 0;
}
var _local2;
var _local3;
_local1 = 0;
while (_local1 < potvory.length) {
if (potvory[_local1].posY == _local4) {
p = potvory[_local1];
if (smer == 4) {
_local2 = p.posX - 1;
_local3 = p.posX;
}
if (smer == 2) {
_local2 = p.posX;
_local3 = p.posX + 1;
}
if ((smer == 1) || (smer == 3)) {
_local2 = p.posX;
_local3 = p.posX;
}
if ((((posX >= _local2) && (posX <= _local3)) && (posY == p.posY)) && (p.utoci != -1)) {
return(p);
}
}
_local1++;
}
return(0);
}
function zastavCas(jak) {
var _local2;
var _local4;
_local2 = 0;
while (_local2 < potvory.length) {
p = potvory[_local2];
if (jak) {
p.potvora.stop(1);
} else {
p.potvora.play();
}
_local2++;
}
if (jak < 0) {
_root.stat.cas.stop();
_root.helpik._visible = true;
_root.helpik.gotoAndStop("pause");
casPauzy = getTimer();
}
if (jak > 0) {
zastaveno = 60;
}
if (!jak) {
_root.helpik._visible = false;
uplynulo = uplynulo + (getTimer() - casPauzy);
_root.stat.cas.play();
}
}
function gameOver() {
if (konec) {
return(0);
}
konec = 1;
_parent.over.play();
}
function konecUrovne() {
if (!konec) {
konec = 2;
return(1);
}
konec = 3;
if (uroven < MAXUROVEN) {
_parent.okoli.nahlas(2);
} else {
_parent.okoli.nahlas(3);
}
}
this.onEnterFrame = function () {
var _local3;
if (stuj) {
return(0);
}
if ((konec == 1) || (konec == 3)) {
return(0);
}
zpracujKlavesy();
if (zastaveno) {
zastaveno--;
if (!zastaveno) {
zastavCas(0);
}
}
_local3 = testujPotvory();
while (_local3) {
_local3.utoci = -1;
this["t" + trubek].zrout.play();
if (_local3.typ != 5) {
_parent.zvukDril.start();
}
_local3.potvora.gotoAndPlay("smrt");
_local3 = testujPotvory();
}
if (zastaveno) {
return(0);
}
if (cekejNaStvoreni) {
cekejNaStvoreni--;
} else {
stvorPotvoru(uroven);
}
};
s0._visible = false;
m0._visible = false;
t1.spoj._visible = false;
potvory = new Array();
mezery1 = new Array(new Array(0), new Array(0), new Array(-30, -15, 0, 10), new Array(5, 10), new Array(0), new Array(0), new Array(-30, -11));
sachty1 = new Array(new Array(0), new Array(-10, 5), new Array(-5, 11), new Array(-12, -1), new Array(-8, 3, 14), new Array(-50, 0), new Array(-7, 10));
sutry1 = new Array(0);
diamanty1 = new Array(20, 3, -15, 5, 15, 7);
mezery2 = new Array(new Array(-30, -16), new Array(13, 30), new Array(0), new Array(0), new Array(-30, -12, 0, 5), new Array(0), new Array(10, 30));
sachty2 = new Array(new Array(0), new Array(-5, 3), new Array(-10, 8), new Array(-15, 0, 11), new Array(-10, -3, 7, 14), new Array(-1, 14), new Array(-5, 5));
sutry2 = new Array(0);
diamanty2 = new Array(-19, 4, 20, 5, -12, 6, -15, 6, 0, 7);
mezery3 = new Array(new Array(0), new Array(16, 30), new Array(14, 30), new Array(16, 30), new Array(0), new Array(-8, 5), new Array(0));
sachty3 = new Array(new Array(0), new Array(-7, 7), new Array(-12, -3, 3), new Array(-15, 0), new Array(-10, 8), new Array(-13, 13), new Array(-10, 6, 16));
sutry3 = new Array(0, 3, -10, 4);
diamanty3 = new Array(19, 1, -19, 3, 14, 4, 0, 5, -18, 6, 10, 6, -16, 7);
mezery4 = new Array(new Array(0), new Array(0), new Array(-30, -10), new Array(12, 30), new Array(0), new Array(0), new Array(0));
sachty4 = new Array(new Array(0), new Array(-6, 12), new Array(1, 6), new Array(-9, -6), new Array(-30, -14), new Array(-8, 12), new Array(-30, 2));
sutry4 = new Array(-30, 3, -9, 3);
diamanty4 = new Array(-16, 2, -7, 3, 10, 4, -19, 5, 16, 5, -13, 6, -5, 7, 10, 7);
mezery5 = new Array(new Array(0), new Array(0), new Array(0), new Array(0), new Array(0), new Array(-30, -4), new Array(-30, 3));
sachty5 = new Array(new Array(0), new Array(-7, 7), new Array(-12, 0), new Array(0, 12), new Array(-30, -10), new Array(3, 13), new Array(-30, 15));
sutry5 = new Array(-7, 1, -12, 2, 0, 2, -10, 4);
diamanty5 = new Array(16, 2, -18, 3, 18, 4, -16, 5, -3, 6, 19, 6, 5, 7);
mezery6 = new Array(new Array(-30, -16, 16, 30), new Array(0), new Array(0), new Array(0), new Array(-30, -8), new Array(4, 30), new Array(0));
sachty6 = new Array(new Array(0), new Array(-6, 5), new Array(-10, -3), new Array(-16, 1), new Array(-30, 9), new Array(-7, -2), new Array(-30, -16));
sutry6 = new Array(-6, 1, -10, 2);
diamanty6 = new Array(19, 2, -15, 3, 17, 3, -5, 4, 15, 5, -10, 6, 10, 7);
mezery7 = new Array(new Array(-30, -11, 11, 30), new Array(-30, -14, 13, 30), new Array(-30, -11, 16, 30), new Array(-30, -3), new Array(-30, -11, 12, 30), new Array(0), new Array(0, 30));
sachty7 = new Array(new Array(0), new Array(-8, 2, 6), new Array(-4, 5), new Array(-30, 0), new Array(5, 10), new Array(-6, 2, 10), new Array(-14, -8));
sutry7 = new Array(2, 5, -8, 6);
diamanty7 = new Array(9, 1, -8, 3, 13, 3, 19, 4, -10, 6, 19, 6, -17, 7);
mezery8 = new Array(new Array(0), new Array(0), new Array(0), new Array(0), new Array(0), new Array(0), new Array(0));
sachty8 = new Array(new Array(0), new Array(-10, 15), new Array(-4, 7), new Array(-10, 8), new Array(-12, -2), new Array(-7, 12), new Array(-30, 5));
sutry8 = new Array(7, 2);
diamanty8 = new Array(-18, 2, 18, 2, 0, 3, 19, 4, -19, 5, 6, 6, -17, 7, 19, 7);
mezery9 = new Array(new Array(0), new Array(16, 30), new Array(-6, -1, 1, 6), new Array(0), new Array(7, 13), new Array(0), new Array(0));
sachty9 = new Array(new Array(0), new Array(-9, 2, 8), new Array(-16, -7), new Array(-14, 0, 15), new Array(-6, 4), new Array(2, 14), new Array(-10, 4, 11));
sutry9 = new Array(-16, 2, -14, 3, 0, 3, 15, 3);
diamanty9 = new Array(16, 1, 11, 2, 1, 3, -19, 4, 19, 5, -19, 6, -17, 7, -2, 7, 19, 7);
mezery10 = new Array(new Array(-30, -15), new Array(-6, -2), new Array(-5, 5), new Array(0, 6), new Array(-2, 5), new Array(-30, -11), new Array(0));
sachty10 = new Array(new Array(0), new Array(-12, -7, 12), new Array(-15, -10, 17), new Array(-12, -7, 12), new Array(-10, 10, 15), new Array(-5, 7), new Array(1, 10));
sutry10 = new Array(-7, 1, -12, 3, -7, 3, 12, 3, -10, 4, -8, 6);
diamanty10 = new Array(4, 2, 19, 2, 6, 3, -17, 5, 18, 5, -17, 7, -3, 7, 16, 7);
mezery11 = new Array(new Array(0), new Array(0), new Array(0), new Array(0), new Array(0), new Array(0), new Array(0));
sachty11 = new Array(new Array(0), new Array(-8, 4, 10), new Array(-4, 10), new Array(-7, 3), new Array(0, 8), new Array(-30, 5), new Array(-4, 10));
sutry11 = new Array(0, 4, 8, 4, 5, 5);
diamanty11 = new Array(-17, 2, 18, 3, 15, 4, -14, 6, 19, 6, -16, 7, 7, 7, 19, 7);
mezery12 = new Array(new Array(-30, -10, 8, 30), new Array(-6, 4), new Array(-3, 4, 16, 30), new Array(-30, -15, 13, 30), new Array(0), new Array(-4, 4), new Array(0));
sachty12 = new Array(new Array(0), new Array(-30, 5), new Array(-15, -8, 10), new Array(-11, -5, 6, 10), new Array(-8, 2, 12), new Array(-30, 7), new Array(-12, 12));
sutry12 = new Array(10, 2, -11, 3, 7, 5, -12, 6, -5, 7, 1, 7);
diamanty12 = new Array(-19, 2, -16, 2, 17, 2, 16, 3, -17, 5, 17, 5, -12, 6, -17, 7, 7, 7, 18, 7);
mezery13 = new Array(new Array(0), new Array(3, 7), new Array(5, 9), new Array(5, 9), new Array(0), new Array(0), new Array(0));
sachty13 = new Array(new Array(0), new Array(-30, -5), new Array(-9, -2, 14), new Array(-5, 17), new Array(0, 10), new Array(-5, 5, 15), new Array(-11, -2, 9));
sutry13 = new Array(-5, 3, 0, 4, 10, 4);
diamanty13 = new Array(17, 2, 3, 3, 11, 3, -17, 4, -9, 6, -5, 7, 19, 7);
mezery14 = new Array(new Array(10, 15), new Array(7, 10), new Array(-10, -6), new Array(-5, 0), new Array(-3, 1), new Array(-5, 0), new Array(0));
sachty14 = new Array(new Array(0), new Array(-8, 3, 17), new Array(-3, 5, 15), new Array(-12, 3, 8), new Array(-15, 11), new Array(-10, 3, 16), new Array(-12, -7, 5, 9));
sutry14 = new Array(8, 3, 11, 4, 3, 5, 16, 5);
diamanty14 = new Array(-16, 2, -16, 3, 18, 3, -7, 4, 16, 4, 15, 7);
mezery15 = new Array(new Array(-7, -4), new Array(-7, 4), new Array(-6, -3), new Array(-7, -1), new Array(-7, -1), new Array(-8, 0), new Array(15, 30));
sachty15 = new Array(new Array(0), new Array(-10, 7, 12), new Array(-10, 10, 14), new Array(-13, 5), new Array(-13, 2, 7, 14), new Array(-13, 10), new Array(-10, 5, 10));
sutry15 = new Array(-10, 2, 14, 2, 5, 3, 14, 4, -13, 5, -10, 6);
diamanty15 = new Array(-15, 2, 18, 3, 16, 4, -18, 5, -18, 6, 17, 6, -14, 7);
mezery16 = new Array(new Array(10, 30), new Array(-3, 7), new Array(-30, -15, 5, 10), new Array(-30, -10), new Array(-8, -5, 15, 30), new Array(-7, 0), new Array(-30, -12));
sachty16 = new Array(new Array(0), new Array(-30, -10), new Array(-10, -5, 11, 16), new Array(-5, 0, 15), new Array(-2, 8, 12), new Array(-16, -12, 12), new Array(-11, 5, 10));
sutry16 = new Array(-10, 1, 8, 4, -2, 5, 10, 6);
diamanty16 = new Array(-17, 2, 14, 2, 16, 2, 18, 4, -18, 5, 18, 6, 1, 7);
mezery17 = new Array(new Array(0), new Array(-30, -8), new Array(9, 12, 16, 30), new Array(8, 13, 16, 30), new Array(-3, 1), new Array(-30, -12), new Array(-30, -2, 16, 30));
sachty17 = new Array(new Array(0), new Array(4, 11), new Array(-2, 8), new Array(-10, 1, 15), new Array(-15, -8, 15), new Array(-6, 6), new Array(4, 9));
sutry17 = new Array(-10, 3, 1, 3, 6, 5);
diamanty17 = new Array(-16, 1, 16, 1, 17, 2, -16, 3, 7, 3, 14, 3, -17, 5, -1, 7, 13, 7);
mezery18 = new Array(new Array(-30, -7, 8, 30), new Array(-30, -9, 10, 30), new Array(-30, -10, 12, 30), new Array(-30, -12, 14, 30), new Array(-30, -14, 16, 30), new Array(-30, -17, 18, 30), new Array(0));
sachty18 = new Array(new Array(0), new Array(-2, 3), new Array(-4, 0, 6), new Array(-7, 8), new Array(-7, 2, 10), new Array(-9, 12), new Array(-12, 0, 12));
sutry18 = new Array(-2, 1, 3, 1, -7, 4, 2, 4, 12, 5, 0, 6, 12, 6);
diamanty18 = new Array(9, 3, 5, 4, -11, 5, -1, 5, 5, 6, -3, 7, 9, 7);
mezery19 = new Array(new Array(-30, -16), new Array(0, 5, 8, 14, 18, 30), new Array(-30, -10, 10, 14, 18, 30), new Array(-30, -15, 10, 14, 18, 30), new Array(10, 14, 16, 30), new Array(-8, -5, 7, 10, 16, 30), new Array(0));
sachty19 = new Array(new Array(0), new Array(-13, -3, 7), new Array(-7, 7, 17), new Array(-5, 2, 17), new Array(-10, -2, 15), new Array(0, 15), new Array(-15, -9, -4, 5, 12));
sutry19 = new Array(-13, 1, -3, 1, 6, 2, -15, 6);
diamanty19 = new Array(15, 2, 4, 3, 15, 3, -14, 5, -10, 6, 12, 7);
mezery20 = new Array(new Array(-30, -11), new Array(0), new Array(-30, -11), new Array(15, 30), new Array(-10, -5, 5, 10), new Array(4, 8), new Array(0));
sachty20 = new Array(new Array(0), new Array(-9, 3, 12), new Array(-4, 5), new Array(0, 9), new Array(-12, 12), new Array(-17, -2, 3, 12, 15), new Array(-15, 0, 10, 16));
sutry20 = new Array(12, 1, 9, 3, 0, 3, -12, 4, 12, 4, 10, 6, 16, 6);
diamanty20 = new Array(-15, 2, 16, 2, -9, 3, 10, 3, -3, 5, 0, 5, 3, 5, 28, 5, -14, 6, -17, 7, 6, 7);
prachy = 0;
SUTR = 7;
DIAMANT = 5;
MAXUROVEN = 20;
Instance of Symbol 243 MovieClip "p0" in Symbol 263 MovieClip Frame 1
onClipEvent (load) {
}
Symbol 263 MovieClip Frame 2
minRoura = 0;
rychlost = 10;
zacRoura = 0;
trubek = 1;
rychlostPotvor = 1;
dilek = 20;
vyskaPatra = 60;
t1.smer = 3;
smer = 3;
posun = 0;
posledni = 0;
sachet = 0;
mezer = 0;
potvor = 0;
uroven = _root.uroven;
vycisti(_root.novaHra);
nakresliSachty();
rozestel(uroven);
nakresliMezery();
stuj = true;
Symbol 263 MovieClip Frame 3
uplynulo = getTimer();
var x = (uroven * 2);
while (x > 0) {
stvorPotvoru(uroven, true);
x--;
}
stuj = false;
Symbol 263 MovieClip Frame 4
stop();
Symbol 268 MovieClip Frame 1
stop();
Symbol 268 MovieClip Frame 2
konec = 1;
x = _parent.system.trubek + 1;
Symbol 268 MovieClip Frame 3
x--;
_parent.system["t" + x].gotoAndPlay("vybuch");
_parent.zvukMina.start();
Symbol 268 MovieClip Frame 10
if (x > 1) {
gotoAndPlay ("uber");
}
Symbol 268 MovieClip Frame 14
_parent.okoli.nahlas(1);
gotoAndStop (1);
Symbol 268 MovieClip Frame 23
stop();
Symbol 269 Button
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
gotoAndStop (1);
}
on (release) {
_root.scoring();
_root.novaHra = true;
_root.gotoAndPlay("mainMenu");
}
Symbol 272 MovieClip Frame 1
stop();
Symbol 276 Button
on (rollOver) {
gotoAndStop (3);
}
on (rollOut) {
gotoAndStop (1);
}
Symbol 277 Button
on (rollOver) {
gotoAndStop (4);
}
on (rollOut) {
gotoAndStop (1);
}
Symbol 278 Button
on (rollOver) {
gotoAndStop (5);
}
on (rollOut) {
gotoAndStop (1);
}
Symbol 279 Button
on (rollOver) {
gotoAndStop (6);
}
on (rollOut) {
gotoAndStop (1);
}
Symbol 292 MovieClip Frame 1
stav = (_parent._parent.system.zivotu + " / ") + _parent._parent.maxZiv;
Symbol 313 MovieClip Frame 4
if (!_parent._parent.system.konec) {
g = getTimer() - _parent._parent.system.uplynulo;
if (!g) {
g = 0;
}
g = g / 1000;
s = Math.floor(g % 60);
m = Math.floor(g / 60);
}
Symbol 313 MovieClip Frame 9
gotoAndPlay (1);
Symbol 313 MovieClip Frame 10
if (g > 0) {
g = g - 10;
_parent._parent.prachy = _parent._parent.prachy - 10;
_root.skore = _root.skore - 10;
_parent._parent.klik();
s = math.floor(g % 60);
m = math.floor(g / 60);
} else {
g = 0;
s = 0;
m = 0;
_parent._parent.okoli.nahlas(4);
gotoAndPlay (1);
}
Symbol 313 MovieClip Frame 11
gotoAndPlay ("uctuj");
Symbol 328 MovieClip Frame 1
stop();
Symbol 331 Button
on (release) {
if (!redy) {
nextFrame();
} else {
_root.system.play();
_visible = false;
}
}
Symbol 348 MovieClip Frame 1
p3.hlava.gotoAndStop(2);
p4.hlava.gotoAndStop(2);
p1.stop();
p2.stop();
p3.stop();
p4.stop();
stop();
Symbol 348 MovieClip Frame 2
p1.stop();
Symbol 348 MovieClip Frame 3
redy = false;
Symbol 348 MovieClip Frame 4
redy = true;
Symbol 348 MovieClip Frame 5
p1.stop();
Symbol 348 MovieClip Frame 6
p1.stop();
Symbol 348 MovieClip Frame 7
p1.stop();
Symbol 348 MovieClip Frame 8
p1.stop();
p2.stop();
Symbol 348 MovieClip Frame 22
_root.scoring();