Frame 1
function startlevel() {
am_snd.stop();
bordo_mc.lives_txt.text = vite;
bordo_mc.score_txt.text = punti;
bordo_mc.level_txt.text = level + 1;
px = 0;
py = 0;
dpx = 0;
dpy = 0;
odx = 0;
ody = 0;
pushx = 0;
pushy = 0;
step = 0;
dir = 0;
facing = 1;
amebatimer = 0;
amebastep = 0;
amebacrescita = 1;
killedweb = true;
doorsnd = true;
scudi = 0;
var _local6 = map[level].split(",");
alt = parseInt(_local6[0]);
larg = parseInt(_local6[1]);
ndiam = parseInt(_local6[2]);
bordo_mc.ndiam_txt.text = ndiam;
tempodisp = parseInt(_local6[3]);
amebapresente = parseInt(_local6[4]);
amebamax = parseInt(_local6[5]);
ntiles = alt * larg;
var _local5;
var _local4;
var _local3;
var _local2;
var _local1 = 0;
var _local7 = _local6[6].length;
_local5 = 0;
while (_local5 < _local7) {
_local3 = _local6[6].charCodeAt(_local5);
if (_local3 > 96) {
_local4 = _local3 - 96;
} else {
_local2 = 0;
while (_local2 < _local4) {
dfield[_local1] = _local3 - 48;
cfield[_local1] = dfield[_local1];
if (dfield[_local1] == 10) {
killedweb = false;
}
dx[_local1] = 0;
dy[_local1] = 0;
vx[_local1] = 0;
vy[_local1] = 0;
ignora[_local1] = 0;
if (dfield[_local1] == 5) {
sy = Math.floor(_local1 / larg);
sx = _local1 - (sy * larg);
}
_local1++;
_local2++;
}
_local4 = 1;
}
_local5++;
}
if (sy > 5) {
py = sy - 5;
sy = 5;
}
if (sx > 10) {
px = sx - 10;
sx = 10;
}
if (amebapresente) {
am_snd.start(0, 9999);
}
gamestate = 2;
tempoiniz = getTimer();
}
function display() {
var _local5;
var _local2;
var _local6 = 0;
var _local4;
var _local3;
_local5 = 0;
while (_local5 < 9) {
_local2 = 0;
while (_local2 < 14) {
_local4 = "t" + _local6;
_local3 = (((py + _local5) * larg) + px) + _local2;
_root[_local4]._x = ((_local2 * 32) + dx[_local3]) + odx;
_root[_local4]._y = ((_local5 * 32) + dy[_local3]) + ody;
_root[_local4].gotoAndStop(dfield[_local3] % 32);
_local6++;
_local2++;
}
_local5++;
}
}
function die() {
if (gamestate == 2) {
if (scudi > 0) {
scudi--;
} else {
vite--;
bordo_mc.lives_txt.text = vite;
bordo_mc.alert_mc._visible = true;
if (vite > 0) {
gamestate = 3;
bordo_mc.alert_mc.gotoAndStop(1);
} else {
gamestate = 4;
bordo_mc.alert_mc.gotoAndStop(3);
}
}
}
}
function explosion(pos, tipo) {
var _local2;
var _local1;
var _local4;
var _local5;
if (gamestate == 2) {
exp_snd.start(0, 1);
}
if (tipo == 9) {
_local5 = 4;
} else if (tipo == 11) {
_local5 = 17;
} else {
_local5 = 1;
}
_local2 = -1;
while (_local2 < 2) {
_local1 = -1;
while (_local1 < 2) {
_local4 = cfield[(pos + (_local2 * larg)) + _local1];
if (_local4 != 6) {
cfield[(pos + (_local2 * larg)) + _local1] = _local5;
ignora[(pos + (_local2 * larg)) + _local1] = 1;
}
if (_local4 == 5) {
die();
cfield[(pos + (_local2 * larg)) + _local1] = 5;
}
_local1++;
}
_local2++;
}
fx_mc._x = ((pos % larg) - px) * 32;
fx_mc._y = (Math.floor(pos / larg) - py) * 32;
fx_mc.gotoAndPlay(2);
}
function muovimasso(pos, tipo) {
var _local2;
if (cfield[pos + larg] == 1) {
cfield[pos + larg] = tipo;
ignora[pos + larg] = 1;
cfield[pos] = 1;
_local2 = cfield[pos + (larg * 2)] % 32;
if ((_local2 == 2) && (tipo == 3)) {
m1_snd.start(0, 1);
}
if ((_local2 > 2) && (tipo == 3)) {
m2_snd.start(0, 1);
}
if ((_local2 > 1) && (tipo == 4)) {
m3_snd.start(0, 1);
}
if (_local2 == 5) {
die();
}
if ((_local2 > 8) && (_local2 < 13)) {
explosion(pos + (larg * 2), _local2);
}
if (_local2 == 8) {
if (cfield[pos + (larg * 3)] == 1) {
cfield[pos + (larg * 3)] = 7 - tipo;
cfield[pos + larg] = 1;
}
}
vy[pos] = 8;
return(undefined);
}
if ((((cfield[pos + larg] == 3) || (cfield[pos + larg] == 4)) && (cfield[pos - 1] == 1)) && (cfield[(pos - 1) + larg] == 1)) {
cfield[pos - 1] = tipo;
ignora[pos - 1] = 1;
cfield[pos] = 1;
vx[pos] = -8;
return(undefined);
}
if ((((cfield[pos + larg] == 3) || (cfield[pos + larg] == 4)) && (cfield[pos + 1] == 1)) && (cfield[(pos + 1) + larg] == 1)) {
cfield[pos + 1] = tipo;
ignora[pos + 1] = 1;
cfield[pos] = 1;
vx[pos] = 8;
}
}
function controlla(pos, direz) {
var _local1 = cfield[pos] % 32;
if ((((_local1 > 5) && (_local1 < 9)) || (_local1 == 14)) || (_local1 == 19)) {
return(false);
}
if ((_local1 > 8) && (_local1 < 14)) {
explosion(pos, _local1);
return(true);
}
if (_local1 == 4) {
pickdiamond();
return(true);
}
if (_local1 == 20) {
scudi++;
return(true);
}
if (_local1 == 17) {
punti = punti + 500;
soldi_snd.start(0, 1);
bordo_mc.score_txt.text = punti;
return(true);
}
if (_local1 == 18) {
tempodisp = tempodisp + 15;
clock_snd.start(0, 1);
return(true);
}
if (_local1 == 15) {
tb_snd.start(0, 1);
cfield[pos] = 819;
return(false);
}
if (_local1 == 3) {
if ((direz == -1) || (direz == 1)) {
if ((cfield[pos + direz] == 1) && (cfield[pos + larg] != 1)) {
cfield[pos + direz] = 3;
ignora[pos + direz] = 1;
cfield[pos] = 1;
vx[pos] = direz * 8;
return(true);
}
return(false);
}
return(false);
}
if (_local1 == 16) {
if (ndiam > 0) {
return(false);
}
gamestate = 1;
level++;
punti = punti + (level * 1000);
if (level == maxlevel) {
level = 0;
}
bordo_mc.alert_mc.gotoAndStop(2);
bordo_mc.alert_mc._visible = true;
}
return(true);
}
function pickdiamond() {
ndiam--;
punti = punti + 50;
if ((ndiam == 0) && (doorsnd)) {
door_snd.start(0, 1);
doorsnd = false;
bordo_mc.effetto_mc.gotoAndPlay(2);
}
if (ndiam < 0) {
punti = punti + 50;
ndiam = 0;
}
bordo_mc.ndiam_txt.text = ndiam;
bordo_mc.score_txt.text = punti;
diam_snd.start(0, 1);
}
function muoviomino(pos) {
if (dir == 9) {
if (cfield[pos - 1] == 2) {
cfield[pos - 1] = 1;
dfield[pos - 1] = 1;
}
if (cfield[pos - 1] == 4) {
cfield[pos - 1] = 1;
dfield[pos - 1] = 1;
pickdiamond();
}
}
if (dir == 10) {
if (cfield[pos + 1] == 2) {
cfield[pos + 1] = 1;
dfield[pos + 1] = 1;
}
if (cfield[pos + 1] == 4) {
cfield[pos + 1] = 1;
dfield[pos + 1] = 1;
pickdiamond();
}
}
if (dir == 11) {
if (cfield[pos + larg] == 2) {
cfield[pos + larg] = 1;
dfield[pos + larg] = 1;
}
if (cfield[pos + larg] == 4) {
cfield[pos + larg] = 1;
dfield[pos + larg] = 1;
pickdiamond();
}
}
if (dir == 12) {
if (cfield[pos - larg] == 2) {
cfield[pos - larg] = 1;
dfield[pos - larg] = 1;
}
if (cfield[pos - larg] == 4) {
cfield[pos - larg] = 1;
dfield[pos - larg] = 1;
pickdiamond();
}
}
if ((dir == 1) && (controlla(pos - 1, -1))) {
vx[pos] = -8;
cfield[pos] = 1;
cfield[pos - 1] = 5;
ignora[pos - 1] = 1;
sx--;
if (sx < 4) {
if (px > 0) {
dpx = -1;
sx = 4;
pushx = 8;
}
}
}
if ((dir == 2) && (controlla(pos + 1, 1))) {
vx[pos] = 8;
cfield[pos] = 1;
cfield[pos + 1] = 5;
ignora[pos + 1] = 1;
sx++;
if (sx > 10) {
if (px < (larg - 14)) {
dpx = 1;
sx = 10;
pushx = -8;
}
}
}
if ((dir == 3) && (controlla(pos + larg, 0))) {
vy[pos] = 8;
cfield[pos] = 1;
cfield[pos + larg] = 5;
ignora[pos + larg] = 1;
sy++;
if (sy > 5) {
if (py < (alt - 9)) {
dpy = 1;
sy = 5;
pushy = -8;
}
}
}
if ((dir == 4) && (controlla(pos - larg, 0))) {
vy[pos] = -8;
cfield[pos] = 1;
cfield[pos - larg] = 5;
ignora[pos - larg] = 1;
sy--;
if (sy < 3) {
if (py > 0) {
dpy = -1;
sy = 3;
pushy = 8;
}
}
}
dir = 0;
}
function muovifarfalla(pos, tipo) {
var _local1 = tipo >> 5;
var _local2;
var _local5;
var _local4;
var _local8 = false;
var _local7 = 0;
var _local6 = tipo % 32;
if (_local6 == 10) {
ragnipres = 1;
}
while ((_local7 < 4) && (_local8 == false)) {
switch (_local1) {
case 0 :
_local2 = pos - 1;
_local5 = -8;
_local4 = 0;
break;
case 1 :
_local2 = pos + larg;
_local5 = 0;
_local4 = 8;
break;
case 2 :
_local2 = pos + 1;
_local5 = 8;
_local4 = 0;
break;
case 3 :
_local2 = pos - larg;
_local5 = 0;
_local4 = -8;
}
if (cfield[_local2] == 5) {
explosion(pos);
}
if ((cfield[_local2] == 12) && (_local6 == 10)) {
explosion(pos);
return(undefined);
}
if (cfield[_local2] == 1) {
cfield[pos] = 1;
_local1--;
if (_local1 < 0) {
_local1 = 3;
}
if (_local6 == 11) {
_local1 = Math.floor(Math.random() * 4);
}
cfield[_local2] = _local6 + (_local1 << 5);
ignora[_local2] = 1;
vy[pos] = _local4;
vx[pos] = _local5;
_local8 = true;
}
_local7++;
_local1++;
if (_local1 == 4) {
_local1 = 0;
}
}
}
function ameba(pos) {
if (cfield[pos - larg] < 3) {
cfield[pos - larg] = 14;
ignora[pos - larg] = 1;
amebacrescita++;
}
if (cfield[pos + larg] < 3) {
cfield[pos + larg] = 14;
ignora[pos + larg] = 1;
amebacrescita++;
}
if (cfield[pos - 1] < 3) {
cfield[pos - 1] = 14;
ignora[pos - 1] = 1;
amebacrescita++;
}
if (cfield[pos + 1] < 3) {
cfield[pos + 1] = 14;
ignora[pos + 1] = 1;
}
}
function trasforma(cosa, incosa) {
var _local1;
_local1 = 0;
while (_local1 < ntiles) {
if (dfield[_local1] == cosa) {
dfield[_local1] = incosa;
}
_local1++;
}
}
function bomba(pos) {
var _local1 = cfield[pos] >> 5;
_local1--;
cfield[pos] = 19 + (_local1 << 5);
if (_local1 == 0) {
explosion(pos, 19);
}
}
function update() {
var _local2;
var _local1;
var _local3;
var _local4;
if (step == 0) {
_local4 = Math.floor(tempodisp - ((getTimer() - tempoiniz) / 1000));
if (_local4 < 0) {
_local4 = 0;
die();
}
bordo_mc.time_txt.text = _local4;
if ((killedweb == false) && (ragnipres == 0)) {
trasforma(13, 1);
killedweb = true;
}
ragnipres = 0;
if (amebapresente) {
amebatimer++;
if (amebatimer == 32) {
amebatimer = 0;
amebacrescita = 0;
amebastep++;
if (amebastep == amebamax) {
trasforma(14, 3);
am_snd.stop();
}
}
}
_local1 = 0;
while (_local1 < ntiles) {
cfield[_local1] = dfield[_local1];
_local1++;
}
_local1 = alt - 1;
while (_local1 > -1) {
_local3 = 0;
while (_local3 < larg) {
_local2 = (_local1 * larg) + _local3;
if (ignora[_local2] == 0) {
switch (cfield[_local2] % 32) {
case 3 :
muovimasso(_local2, 3);
break;
case 4 :
muovimasso(_local2, 4);
break;
case 5 :
muoviomino(_local2);
break;
case 9 :
case 10 :
case 11 :
muovifarfalla(_local2, cfield[_local2]);
break;
case 14 :
if (amebatimer == 0) {
ameba(_local2);
}
break;
case 19 :
bomba(_local2);
}
}
_local3++;
}
_local1--;
}
} else {
_local1 = 0;
while (_local1 < ntiles) {
dx[_local1] = dx[_local1] + vx[_local1];
dy[_local1] = dy[_local1] + vy[_local1];
_local1++;
}
odx = odx + pushx;
ody = ody + pushy;
}
step++;
if (step > 3) {
step = 0;
odx = 0;
ody = 0;
pushx = 0;
pushy = 0;
px = px + dpx;
dpx = 0;
py = py + dpy;
dpy = 0;
_local1 = 0;
while (_local1 < ntiles) {
dfield[_local1] = cfield[_local1];
dx[_local1] = 0;
dy[_local1] = 0;
vx[_local1] = 0;
vy[_local1] = 0;
ignora[_local1] = 0;
_local1++;
}
if (amebapresente && (amebacrescita == 0)) {
trasforma(14, 4);
amebapresente = 0;
am_snd.stop();
}
}
}
function startgame() {
am_snd.stop();
level = 0;
vite = 4;
punti = 0;
gamestate = 1;
bordo_mc.alert_mc.gotoAndStop(4);
}
var map = new Array();
map[0] = "14,31,10,60,0,12,\u00801}6b16h24g2323e24b26b16g23d2c3c24c23d26b1623c2423b24234Al26b16k23f23e23b26b16h24i23e24326b16e24l24c23d26b16b23i24n26b16h2Ak2c1;b126b1625m2b3h2@26b16o24k26b1}6\u00801";
map[1] = "20,33,36,180,0,12,\u00821g6n1d6h165d2c6f1g6b4c6f16c23d2f6j24b6e16d23c27j23e24b6d16g2?7d2b4d23f24b6c1b63f27b24f2c4243d2b6c16c232327b2e4b2b4b24f26c16g27b2b4e23b2b4c23b26c1b6f27b2b42b4c2d4f26d1b6c2327i2d4e2b36e1b6c2?7o23d26f1b6c27c23h23g26g1b6b27g2323j26h1c67m2<A<c2b6k1d6h232c<2@26o1d6l2b6r1j6b2b6|1d6\u00851";
map[2] = "20,30,25,480,1,20,1d6z1652y6b16d237d23f23g2@6b1b624b27b23d2b3c23b23d26c1b6c27t26d16c27e23c23e2323b26d16b2<723b23g23g26d1e6d27g27d2Ab26g1b6d27g27g26h16d27g27g26h16d27g27g26h16d27g2c13d26h16d27g27g26h16d27g27g26h16d27g27g26h16d27g27d2Ab26h16d27c2>c27?f26h1v61";
map[3] = "15,28,20,180,0,12,}1z6b16v2A26b162i327l26b162i327b21c21c2126b16k27b21c29c2126b16k27b21c21c2126b16k27b21c21c2926b16k27b29c21c2126b16x26b16q2Af26b16x26b16@5c2Ar26b1z6}1";
map[4] = "15,49,30,270,1,12,\u00921\u00856c1g6b16}2=e26c16d2@6b16c2g72?f7c23c23c2=b23b26c16e76b16c27e27b27d47k2=e26c162<c26b165b27b2>b27b27d47c21c21c2=b21b26c16e26b16c27e27b27d47c21c2:c2=b21b2e6e26b16231f27b27d47c21c21c2=b2;d2Dg26b16b23f27b27d47c21c21c2=b21b2e6e26b16c2g7b2f7c29c21c2=b21b26c16e26b16}2=e26c16e26b16}2=e26c16e26b16d2BABABt2=e26c16e26b1\u00856c1g6\u00921";
map[5] = "30,33,15,240,0,12,\u00851h6i1h6g16h26g16h26e16i26g16i26c1625i26e16i2@26b16f2b3c26e16d2b3e26b16e2d3c26c16d2d3d26b16e2d3d2616e2d3d26b16f2b3f26g2b3e26b16}26b1b6|26c16|26c16c2b8r2b8c26c1b6d2b8n2b8e26d16f28l28f2b6d1b6f28j28f2b6f16g2j8f2b6g1b6u2b6i16u26k16s2b6l1b6b2<2c1:d12<b2b6n1b6n2c6p1b6k2c6r16j2b6u16g2c6v1b6d2c6y1c62b6}1c616\u00911";
map[6] = "21,33,10,120,0,12,\u008216b165c21f2:e21k26b162Ab21f21e21c2323232326b162Ab21f21e21f2Bd26b162Ab21f21e2:c2323232326b16d2:f21e21k26b16z7c26b16e21e21e21k26b163d29e21e29f2424b26b16b23b21e21e21b2B24e246b1623c21e29e21f2424b26b16e21e21e21k26b162B2z76b16h21e21n26b163b23d21e21e242424d26b16h21b2Bb21f24B4e26b16b23e21e2;e242424b2bA6b16h2;e21f2424c2A@6b16\u00821";
map[7] = "21,47,45,240,0,12,\u00901\u008D6b1652?236@b24b23c23j24b1:e14d2326b16c2346f23232323c26d32h6e2426b16b23426f23232323c26d326d2b=6b24d26b16234b2624d23232323c26d326=4b24A623e26b1634c26d2423232323c26e26f26g26b164d26h23c23c26e26c2=426f1;6b16e2r6d8264b2=4=62?c2?26b16e26b2b<c26h26e26f26g26b16e26b24d262b3c2b36e26b24c26c242426b162e6b2b<c26e23b26e26Ab2=24623e26b16d21c24<c26c23c236e26d2426g26b16d21c2<d26h26e262=d26;f16b16b2<29b24<d26b3<b23b2g6b24c262?c2?26b16b2421b2b<d26h23232c32=b2426g26b164c21c2<d2623b2b3?d23<b3f262424b236b16b<2h6b26d232323c2323b2=c2624c2426b16c2h4b2=c2i4b2?f2Ag26b1\u008D6\u00901";
map[8] = "22,33,32,200,0,12,\u008216b165h26c23d23d23d2@6b16f2b326c23d23d23e26b16i26q2bA6b16b29f26c21d21d21e26b16b29f26c29d29d29e26b16b21f26c29d29d29e26b16b21f26c21d21b2321e26b16b21f26c21d21d21c2326b16b21f26c2;d2;23b2123c26b16b21f262321d21d2;e26b16b21f26c21d21d21e26b16b21f26c21d21d21e26b16b2:f26c29d21d29e26b16b2:f26c29d29d29c2326b16b2:f26c21d29d21e26b16b2:f2=c21d21d21e26b16b2:f2=c21d21d21b23b26b16i2=c23o26b16\u00821";
map[9] = "23,31,22,120,0,12,\u00801}6b1621c2b4g23l26b1625f2b4d23l26b16k2b4?3l26b1{626|1626n1g6g1626n16e26g1626n162<c2i626b1m6g27g26b16s27?f26b16h3f2n6b16c4b2c4d2c6o164<4b24<4d26q16c4b2c4d26q16l26q16l26q16k2A6q16l26q16h2Ab2@6q1n6\u008F1";
map[10] = "33,30,20,120,1,30,1k6s16cAf26s16c23e2m6g16u26g16u26g16g29f14e2b6g16n24b23126h1h6g24e26o16g24b21b2g6i16e2e71h26i16e27c271f2326i16c25272>271h26i1623c27c27c1:e26i16e27b2b7i26i1613f1k26i1n623b2c6v16b2326x163c26x16d26x16232<6x16c236m1l6d26m16b2:2121h26m16b212:21h26m16b21212:h26m16b212121d2<c26m16<212121h26m16b212121h26m16b212121e2c<6m16@212121e2<246m1q6\u00811";
map[11] = "23,25,11,110,0,12,z1w6b16c131513m16b161i61i616b1616e13j19616b16161g61g61616b161616c13h1961616b1616161e61e6161616b16161616h196161616b161616161c61c616161616b1616161616d19616161616b16j1@j16b1616161616e1616161616b161616161c61c616161616b16161616i16161616b1616161e61e6161616b161616m161616b16161g61g61616b1616q1616b161h6@1i616b16u16b1w6z1";
map[12] = "17,39,4,122,0,12,\u00881x6o16q1:d16o161i=l16o161=f19=l16o161=g1=l1n6b161=b1c3b1=1i3b14i1c=6b161=15c2b1=1i2b14i1b=@6b161=g1=l1n6b161=g1=l16o161=g1=l16o161i=f1b3d16o16p1b2d16o16t1b26o16t12<6o1x6\u00951";
map[13] = "21,33,15,150,1,12,\u008216b165{2>6b16}26b16}26b16p2Al26b16p2Aj2A26b16}26b16w2Ae26b16}26b16}26b16<21:b12<u26b16}86b16x1cAb16b16}16b16}16b16}16b16}16b16@|16b16\u00821";
map[14] = "22,33,2,280,0,12,\u008216b162737c26c1616c1616c16:6c46b165c7c26c1616c1616c1616c26b1621?1c26c1616c1616c1616c26b162c1c26c1616c1616c1616c26b162c1c2e61e61e616c26b162?71h21e21e21b2426b162c1c2e61e61e61e6b162c1c26c1616:b1616c1616bBD6b162c1c26161616161616161616cB6b1621<1b2<6161616161616161616c16b1c6=e6161c6161c6161c6c16b16i16e16e16e1b26b16i16e16e16e12<6b1}676b16d23?e3?e3?e3?d326b16c2e3?e3?e3?e3?326b16b2b3?3?c3?3?c3?3?c3?3?c3?6b16@2z326b16\u00821";
map[15] = "21,21,35,120,0,12,16p1d64d6k1b6c23c2b6i16b2c32c3b26g16b23c24c23b26e1b6232c42c4232b6d16232b4e2b42326d162324g242326d162324g242326c164324d25@c242346c162324g242326d162324g242326d16232b4e2b42326d1b6232c42c4232b6e16b23c24c23b26g16b2c32c3b26i1b6c23c2b6k1d62d6p161";
map[16] = "21,32,36,20,0,12,\u00811~6b165z1:6b16b1:j1:g1e4b16b16b1e6b1j6b1e6b16b16b16Be1Bh1Be1B6b16b16b16v16:16b16b16b1b6b1j6b1b6b16:16b16b16b16p16b16b16b16b16b16p16b16b16b16b16b16e1f4e16b16b16b16b16b16d1h4d16b16b16b16b16b16c1j4c16b16b16b16b16b1b6b1j6b1b6b16b16b16b16j1b:j16b16b16b16d4b1Bh1Bb1d46b16b16b1e6b1j6b1e6b16b16|16b16:z1@6b1~6\u00811";
map[17] = "23,34,30,60,0,12,\u00831\u00806b165h2b3b2Ab23e2b=4c2=26b16d2324d2b4b2b4b23=c24b23b26b16h23f23e23c2323b26b16{7c26b16|2426b16d2424c23f2b32bAe23=26b162324d2=23c23i24e26b16c24b2=g23o26b16Bb3b2y76b16Bb24z26b16B=l2b3c24b23b2b3c26b16Bd2b4b2b324c23d24d23c26b1623d=j2=232b3c2423b26b16b23d23c2cAk2423b26b16x7f26b16e23l2c3h236b16b2b34c23b24c24e2b=b24d26b16c2b4324c34d2b3c23b23c2b=6b16@l243d24c2=c23=:6b1\u00806\u00831";
map[18] = "22,33,92,160,0,12,\u008216b165|26b16b2c721c7b2c721c7b2c7d26b16b273721737b273721737b2737d26b16b273721737b273721737b2737d26b16b279721797b279721797b2797d26b16b274721747b27472:747b2747d26b16b274721747b274721747b2747d26b16b27472:747b274721747b2747d26b16b274721747b274721747b2747c2:6b16b274721747b274721747b274723216b16b274721747b274721747b2747c216b16b274721747b274721747b2747c216b16b274721747b274721747b274723216b16b274721747b274721747b2747c216b16b274721747b274721747b2747d26b16b274721747b274721747b2747232<6b16b274721747b274721747b2747b2b76b16c24b2124d24b2124d24c27@6b16\u00821";
map[19] = "22,34,30,180,0,12,\u00831\u00806b165}26b162i7b2i7b2f726b1627g47b27g37b27d1726b1627g37b27g97b2d71726b16b27e37d27e97c27d1726b16c27c37f27c37d271d726b16c27c37f27c37b2<3e1726b16d2737h2737e2d71726b16c27c27f27c27d27d1726b16c27c27f27c27d271d726b16b27e27d27e27c27d1726b1627g27b27g27b2d71726b1627g27b27g27b27:c1726b1627g27b27g27b2f726b16~26b16~26b16|2b=6b16|2=@6b1\u00806\u00831";
var diam_snd = new Sound();
var exp_snd = new Sound();
var tb_snd = new Sound();
var m1_snd = new Sound();
var m2_snd = new Sound();
var m3_snd = new Sound();
var am_snd = new Sound();
var soldi_snd = new Sound();
var door_snd = new Sound();
var clock_snd = new Sound();
diam_snd.attachSound("diamante");
exp_snd.attachSound("esplosione");
tb_snd.attachSound("click");
m1_snd.attachSound("m1");
m2_snd.attachSound("m2");
m3_snd.attachSound("m3");
am_snd.attachSound("ameba");
soldi_snd.attachSound("soldi");
door_snd.attachSound("door");
clock_snd.attachSound("clock");
am_snd.setVolume(50);
bordo_mc.swapDepths(10000);
fx_mc.swapDepths(9999);
var maxlevel = 20;
var i;
var j;
var n = 0;
var level;
var highlevel;
var vite;
var punti;
var gamestate;
var tidle = 0;
i = 0;
while (i < 9) {
j = 0;
while (j < 14) {
var nome = ("t" + n);
_root.attachMovie("tile", nome, n + 5);
_root[nome]._x = j * 32;
_root[nome]._y = i * 32;
n++;
j++;
}
i++;
}
var larg;
var alt;
var ntiles;
var cfield = new Array();
var dfield = new Array();
var dx = new Array();
var dy = new Array();
var vx = new Array();
var vy = new Array();
var ignora = new Array();
var px;
var py;
var dpx;
var dpy;
var odx;
var ody;
var pushx;
var pushy;
var step;
var dir;
var facing;
var amebatimer;
var amebapresente;
var amebamax;
var amebastep;
var amebacrescita;
var tempodisp;
var sx;
var sy;
var ndiam;
var tempoiniz;
var ragnipres;
var killedweb;
var scudi;
var doorsnd;
_root.onEnterFrame = function () {
switch (gamestate) {
case 2 :
if (Key.isDown(27)) {
scudi = 0;
die();
}
if (Key.isDown(37)) {
dir = 1;
facing = 1;
}
if (Key.isDown(39)) {
dir = 2;
facing = 2;
}
if (Key.isDown(40)) {
dir = 3;
}
if (Key.isDown(38)) {
dir = 4;
}
if (Key.isDown(16)) {
dir = dir + 8;
}
if (dir) {
tidle = 0;
} else {
tidle++;
}
update();
display();
return;
case 3 :
if (Key.isDown(13)) {
bordo_mc.alert_mc._visible = false;
startlevel();
}
update();
display();
return;
case 4 :
if (Key.isDown(32)) {
startgame();
}
return;
case 1 :
if (!Key.isDown(13)) {
break;
}
if (level > highlevel) {
highlevel = level;
so.data.ml = highlevel;
so.flush();
}
bordo_mc.alert_mc._visible = false;
startlevel();
}
};
var so = SharedObject.getLocal("soroflash", "/");
highlevel = so.data.ml;
if (highlevel == undefined) {
highlevel = 0;
}
startgame();
Symbol 72 MovieClip [tile] Frame 1
stop();
Instance of Symbol 27 MovieClip in Symbol 72 MovieClip [tile] Frame 5
onClipEvent (load) {
if (_root.gamestate == 3) {
this.gotoAndStop(5);
} else {
var base = 0;
if (_root.scudi > 0) {
base = 2;
}
this.gotoAndStop(_root.facing + base);
}
}
onClipEvent (enterFrame) {
if (_root.tidle > 32) {
this.gotoAndStop(6);
} else {
var base = 0;
if (_root.scudi > 0) {
base = 2;
}
this.gotoAndStop(_root.facing + base);
}
if (_root.gamestate == 3) {
this.gotoAndStop(5);
}
}
Instance of Symbol 64 MovieClip in Symbol 72 MovieClip [tile] Frame 16
onClipEvent (load) {
if (_root.ndiam == 0) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
onClipEvent (enterFrame) {
if (_root.ndiam == 0) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Symbol 100 Button
on (release) {
nextFrame();
}
Symbol 120 MovieClip Frame 1
stop();
Symbol 122 Button
on (release) {
_root.bordo_mc.alert_mc._visible = false;
_root.startlevel();
}
Symbol 123 Button
on (release) {
_root.level = _root.highlevel;
_root.bordo_mc.alert_mc._visible = false;
_root.startlevel();
}
Symbol 124 Button
on (release) {
getURL ("http://www.clarencita.it/", "_blank");
}
Symbol 125 MovieClip Frame 1
stop();
Symbol 128 MovieClip Frame 1
stop();
Symbol 131 MovieClip Frame 1
stop();