Frame 1
function EncrpytString(strVal) {
var _local7 = "aHfEjcDebChGiAfIjDbEjacD";
var _local8 = _local7.length;
var _local11 = "0";
var _local3 = "";
var _local9 = strVal.length;
var _local1 = 0;
_local3 = "";
var _local4;
var _local6;
var _local2;
var _local5 = 0;
nCnt = 0;
while (nCnt < _local9) {
_local4 = strVal.charCodeAt(nCnt);
if (_local4 >= 128) {
_local4 = "X";
}
_local6 = _local7.charCodeAt(_local1);
_local1 = _local1 + 1;
if (_local1 >= _local8) {
_local1 = 0;
}
_local2 = (_local4 % 16) + _local6;
_local3 = _local3 + String.fromCharCode(_local2);
_local5 = _local5 + _local2;
_local6 = _local7.charCodeAt(_local1);
_local1 = _local1 + 1;
if (_local1 >= _local8) {
_local1 = 0;
}
_local2 = Math.floor(_local4 / 16) + _local6;
_local3 = _local3 + String.fromCharCode(_local2);
_local5 = _local5 + _local2;
nCnt++;
}
_local5 = _local5 % 256;
_local6 = _local7.charCodeAt(_local1);
_local1 = _local1 + 1;
if (_local1 >= _local8) {
_local1 = 0;
}
_local2 = (_local5 % 16) + _local6;
_local3 = _local3 + String.fromCharCode(_local2);
_local6 = _local7.charCodeAt(_local1);
_local1 = _local1 + 1;
if (_local1 >= _local8) {
_local1 = 0;
}
_local2 = Math.floor(_local5 / 16) + _local6;
_local3 = _local3 + String.fromCharCode(_local2);
return(_local3);
}
function GetUrlParam(strUrl, strParam) {
var _local4 = strUrl.toLowerCase();
var _local1 = _local4.indexOf(strParam);
var _local5 = strParam.length;
if (_local1 > 0) {
var _local3;
var _local2 = _local4.indexOf("&", _local1 + _local5);
if (_local2 > 0) {
_local3 = _local2 - _local1;
} else {
_local3 = strUrl.length - _local1;
}
return(strUrl.substr(_local1 + _local5, _local3));
}
return("");
}
function GetBaseUrl(strUrl) {
var _local1 = strUrl.toLowerCase();
var _local2 = _local1.length;
var _local3 = _local1.indexOf("?", 0);
if (_local3 > 0) {
_local2 = _local3;
}
var _local4 = "download";
if (_local1.substr(0, 4) == "http") {
_local4 = strUrl.substr(7, _local2 - 7);
}
return(_local4);
}
stop();
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__("e68eb6c0", this, 10301, true);
Instance of Symbol 245 MovieClip in Frame 1
/* no clip actions */
Frame 2
function zacni() {
potvory = new Array();
postavy = new Array();
zraneni = new Array();
potvory0 = new Array();
postavy0 = new Array();
zraneni0 = new Array();
nelzeOdpocivat = false;
dnuZbyva = undefined;
zkusenost = 0;
zkusenostTed = 0;
bonusStreh = 0;
bonusZivotu = 0;
}
function testujUpgrade() {
var _local2 = zkusenost;
odecti = 9;
var _local1;
_local1 = 1;
while (_local1 <= bonusStreh) {
_local2 = _local2 - odecti;
odecti = odecti + 2;
_local1++;
}
_local1 = 1;
while (_local1 <= bonusZivotu) {
_local2 = _local2 - odecti;
odecti = odecti + 2;
_local1 = _local1 + 2;
}
if (_local2 >= odecti) {
return(1);
}
return(0);
}
function uzdravSkupinu(strana, kolik) {
if (strana == 1) {
pole = _root.postavy;
} else {
pole = _root.potvory;
}
var _local4;
var _local2;
_local2 = pole.length - 1;
_local2 = 0;
while (_local2 < pole.length) {
zraneni[_local2] = zraneni[_local2] - kolik;
if (zraneni[_local2] < 0) {
zraneni[_local2] = 0;
}
_local2++;
}
}
function vyprazdniSkupinu(strana) {
var _local2;
var _local4;
var _local3;
if (strana == 2) {
_local3 = _root.potvory;
} else {
_local3 = _root.postavy;
}
_local4 = _local3.length;
if (!_local4) {
return(0);
}
_local2 = 0;
while (_local2 < _local4) {
_local3.pop();
_local2++;
}
}
function zobrazVysledek(vys) {
if (!vys) {
return(0);
}
var _local1 = "";
switch (vys) {
case -5 :
_local1 = "vymlacen";
break;
case -4 :
_local1 = "ukraden";
break;
case -3 :
_local1 = "zavrazden";
break;
case -2 :
_local1 = "zavrazden";
break;
case -1 :
_local1 = "utecen";
break;
case 1 :
_local1 = "utekl";
break;
case 2 :
_local1 = "zavrazdil";
break;
case 3 :
_local1 = "zavrazdil";
break;
case 4 :
_local1 = "ukradl";
break;
case 5 :
_local1 = "vymlatil";
}
prohlas(_local1);
}
function prohlas(co) {
if (!co) {
_root.bojiste.ukazMenu(true);
hlaska._visible = false;
return(0);
}
_root.bojiste.ukazMenu(false);
hlaska._visible = true;
hlaska.gotoAndStop(co);
}
function naverbuj(typ, kolik, kam) {
var _local7;
var _local3;
var _local2;
_local3 = kolik;
while (_local3 > 0) {
if (typ == 0) {
_local2 = random(5) + 1;
} else if (typ == 1) {
_local2 = random(13) + 1;
} else if (typ == 2) {
if (random(2)) {
_local2 = 17;
} else {
_local2 = random(7) + 17;
}
} else {
_local2 = random(3) + 14;
}
if ((_local2 == 21) || (_local2 == 22)) {
_local2 = 17;
}
kam.push(_local2);
_root.zraneni.push(0);
_local3--;
}
}
function survivalNovyKolo() {
var _local2;
var _local5;
var _local3;
var _local4 = kolo;
if (_local4 < 2) {
_local4 = 2;
}
if (_local4 > 9) {
_local4 = 9;
}
while (potvory.length) {
potvory.pop();
}
_root.poucka = "";
_root.HRAC1 = 1;
_root.HRAC2 = 0;
_root.HLAVNIHRDINA1 = 0;
_root.HLAVNIHRDINA2 = 0;
_root.VIP1 = 0;
_root.VIP2 = 0;
_root.DILKUX = 9;
_root.DILKUY = 9;
_root.UTEK1 = 0;
_root.UTEK2 = 5;
_root.RAZENI1X = 0;
_root.RAZENI1Y = 0;
_root.RAZENI2X = 2;
_root.RAZENI2Y = 0;
_local5 = random(100);
if (_local5 < 70) {
naverbuj(2, _local4 + random(3), _root.potvory);
} else if (_local5 < 85) {
naverbuj(3, _local4 + random(2), _root.potvory);
} else {
_local3 = random(2) + 1;
_local2 = 1;
while (_local2 <= _local3) {
_root.potvory.push(21);
_local2++;
}
_local3 = random(3);
_local2 = 1;
while (_local2 <= _local3) {
_root.potvory.push(random(_local4) + 14);
_local2++;
}
}
if (!kolo) {
kolo = 1;
} else {
kolo = kolo + 1;
}
trace("KOLO JE " + kolo);
gotoAndPlay ("game");
}
function nactiDruzinu() {
while (postavy.length) {
postavy.pop();
}
while (potvory.length) {
potvory.pop();
}
while (zraneni.length) {
zraneni.pop();
}
var _local1;
_local1 = 0;
while (_local1 < postavy0.length) {
postavy.push(postavy0[_local1]);
_local1++;
}
_local1 = 0;
while (_local1 < potvory0.length) {
potvory.push(potvory0[_local1]);
_local1++;
}
_local1 = 0;
while (_local1 < zraneni0.length) {
zraneni.push(zraneni0[_local1]);
_local1++;
}
}
function ulozDruzinu() {
while (postavy0.length) {
postavy0.pop();
}
while (potvory0.length) {
potvory0.pop();
}
while (zraneni0.length) {
zraneni0.pop();
}
var _local1;
if (HRAC1) {
_local1 = 0;
while (_local1 < postavy.length) {
postavy0.push(postavy[_local1]);
_local1++;
}
} else {
_local1 = 0;
while (_local1 < potvory.length) {
potvory0.push(potvory[_local1]);
_local1++;
}
}
_local1 = 0;
while (_local1 < zraneni0.length) {
zraneni.push(zraneni0[_local1]);
_local1++;
}
}
function ranenych() {
var _local2 = 0;
var _local1 = 0;
while (_local1 < zraneni.length) {
if (zraneni[_local1]) {
_local2++;
}
_local1++;
}
return(_local2);
}
typyPotvor = new Array({jmeno:"", boj:0, sila:0, rychlost:4, agrese:0}, {jmeno:"Amazon", boj:14, sila:14, rychlost:4, zkusenost:3, postava:1, velikost:2, pohlavi:2, agrese:0}, {jmeno:"Swordsman", boj:16, sila:10, rychlost:4, zkusenost:3, postava:2, velikost:2, pohlavi:1, agrese:0}, {jmeno:"Dwarf", boj:12, sila:18, rychlost:4, zkusenost:3, postava:3, velikost:1, pohlavi:1, agrese:0}, {jmeno:"Sorceress", boj:14, sila:10, rychlost:4, zkusenost:3, postava:4, velikost:2, pohlavi:2, burn:2, agrese:0}, {jmeno:"Spy", boj:14, sila:10, rychlost:5, zkusenost:3, postava:5, velikost:2, pohlavi:2, lethality:1.5, agrese:0}, {jmeno:"Pikeman", boj:8, sila:8, rychlost:4, zkusenost:1, postava:18, velikost:2, pohlavi:1, agrese:0}, {jmeno:"Pikeman", boj:8, sila:8, rychlost:4, zkusenost:1, postava:18, velikost:2, pohlavi:1, agrese:0}, {jmeno:"Pikeman", boj:8, sila:8, rychlost:4, zkusenost:1, postava:18, velikost:2, pohlavi:1, agrese:0}, {jmeno:"Dwarf berserker", boj:6, sila:16, rychlost:4, zkusenost:2, postava:16, velikost:1, pohlavi:1, agrese:3}, {jmeno:"Dwarf marksman", boj:4, sila:10, rychlost:4, zkusenost:1, postava:17, velikost:1, pohlavi:1, shoot:3, agrese:0}, {jmeno:"Pikeman", boj:8, sila:8, rychlost:4, zkusenost:1, postava:18, velikost:2, pohlavi:1, agrese:0}, {jmeno:"Suit guard", boj:10, sila:12, rychlost:4, zkusenost:2, postava:19, velikost:2, pohlavi:1, agrese:0}, {jmeno:"Monk", boj:5, sila:6, rychlost:4, zkusenost:1, postava:20, velikost:1, pohlavi:1, inflame:2, agrese:0}, {jmeno:"Grey wolf", boj:4, sila:8, rychlost:5, zkusenost:1, postava:9, velikost:1, pohlavi:3, agrese:-1}, {jmeno:"Black wolf", boj:5, sila:7, rychlost:5, zkusenost:1, postava:10, velikost:1, pohlavi:3, agrese:0}, {jmeno:"White wolf", boj:6, sila:12, rychlost:5, zkusenost:2, postava:11, velikost:1, pohlavi:3, agrese:2}, {jmeno:"Orc", boj:5, sila:8, rychlost:4, zkusenost:1, postava:12, velikost:1, pohlavi:1, lethality:0.5, agrese:0}, {jmeno:"Orc leader", boj:7, sila:13, rychlost:4, zkusenost:2, postava:13, pohlavi:1, velikost:1, agrese:0}, {jmeno:"Orc shaman", boj:3, sila:5, rychlost:3, zkusenost:1, postava:14, pohlavi:1, velikost:1, lethality:0.5, inflame:2, agrese:0}, {jmeno:"Orc marksman", boj:4, sila:7, rychlost:4, zkusenost:1, postava:15, pohlavi:1, velikost:2, shoot:3, agrese:0}, {jmeno:"Troll", boj:6, sila:25, rychlost:4, zkusenost:3, postava:21, velikost:3, lethality:1.5, pohlavi:1, agrese:0}, {jmeno:"Dark lady", boj:16, sila:22, rychlost:4, zkusenost:4, postava:22, velikost:3, pohlavi:2, burn:2, agrese:4}, {jmeno:"Orc assassin", boj:7, sila:8, rychlost:5, zkusenost:2, postava:24, velikost:2, pohlavi:1, lethality:1.5, agrese:0}, {jmeno:"Unknown 1", boj:7, sila:8, rychlost:5, zkusenost:1, postava:24, velikost:2, pohlavi:1, lethality:1.5, agrese:0}, {jmeno:"Unknown 2", boj:7, sila:8, rychlost:5, zkusenost:1, postava:24, velikost:2, pohlavi:1, lethality:1.5, agrese:0}, {jmeno:"Unknown 3", boj:7, sila:8, rychlost:5, zkusenost:1, postava:24, velikost:2, pohlavi:1, lethality:1.5, agrese:0}, {jmeno:"Captain", boj:10, sila:12, rychlost:4, zkusenost:2, postava:19, velikost:2, pohlavi:1, agrese:0}, {jmeno:"Man", boj:4, sila:8, rychlost:4, zkusenost:1, postava:28, velikost:2, pohlavi:1, lethality:0.5, agrese:0}, {jmeno:"Lady", boj:3, sila:6, rychlost:4, zkusenost:0, postava:23, velikost:2, pohlavi:2, lethality:0.4, inflame:3, agrese:0});
zraneni = new Array();
typHrace = 5;
naStrane = 1;
mod = 1;
testovaniDeje = false;
testovaniBitvy = false;
udelatkoBarva = 1;
udelatkoMnozstvi = 1;
survivalKolo = 0;
napoveda = 1;
krev = 2;
diff = 1;
Instance of Symbol 395 MovieClip "hlaska" in Frame 2
onClipEvent (load) {
_visible = false;
}
Frame 3
function Zvuk() {
this.au1 = new Sound();
this.au1.attachSound("au1");
this.au2 = new Sound();
this.au2.attachSound("au2");
this.brink1 = new Sound();
this.brink1.attachSound("brink");
this.brink2 = new Sound();
this.brink2.attachSound("brink");
this.brink3 = new Sound();
this.brink3.attachSound("brink");
this.uder1 = new Sound();
this.uder1.attachSound("uder1");
this.uder2 = new Sound();
this.uder2.attachSound("uder1");
this.uder3 = new Sound();
this.uder3.attachSound("uder1");
this.zasah1 = new Sound();
this.zasah1.attachSound("zasah1");
this.zasah2 = new Sound();
this.zasah2.attachSound("zasah1");
this.zasah3 = new Sound();
this.zasah3.attachSound("zasah1");
this.zab = new Sound();
this.zab.attachSound("zab");
this.chcip2 = new Sound();
this.chcip2.attachSound("chcip2");
this.chcip3 = new Sound();
this.chcip3.attachSound("chcip3");
this.signal1 = new Sound();
this.signal1.attachSound("bourebuben");
this.vystrel1 = new Sound();
this.vystrel1.attachSound("vystrel1");
this.deepthud = new Sound();
this.deepthud.attachSound("deepthud");
this.kouzlo1inflame = new Sound();
this.kouzlo1inflame.attachSound("kouzlo1");
this.kouzlo2burn = new Sound();
this.kouzlo2burn.attachSound("kouzlo2");
}
function hudboHraj(kolik) {
zvukPozadi.stop();
zvukPozadi.attachSound(hudby[kolik]);
typHudby = kolik;
var _local2 = 36000;
if (!ticho) {
zvukPozadi.start(0, _local2);
}
if (kolik == 2) {
zvukPozadi.setVolume(80);
} else {
zvukPozadi.setVolume(50);
}
}
zvuky = new Zvuk();
hudby = new Array("", "uvod", "scenar", "bitka");
zvukPozadi = new Sound();
zvukPozadi.setVolume(50);
ticho = false;
typHudby = 0;
hlaska._visible = false;
Frame 6
Frame 7
hlaska.skryj();
stop();
Frame 8
DILKUX = 9;
DILKUY = 9;
HRAC1 = 1;
HRAC2 = 0;
HLAVNIHRDINA1 = 0;
HLAVNIHRDINA2 = 0;
VIP1 = 0;
VIP2 = 0;
POKLAD1 = 0;
POKLAD2 = 0;
POKLAD1X = 0;
POKLAD1Y = 0;
POKLAD2X = 0;
POKLAD2Y = 0;
UTEK1 = 4;
UTEK2 = 2;
MORALKA1 = 0;
MORALKA2 = 0;
RAZENI1X = -1;
RAZENI1Y = 1;
RAZENI2X = 1;
RAZENI2Y = -1;
POSILA1X = 0;
POSILA1Y = 0;
POSILA1CAS = 0;
POSILA2X = 0;
POSILA2Y = 0;
POSILA2CAS = 0;
vysledekBoje = 0;
zacni();
hlaska.zavri();
if (mod == 1) {
gotoAndPlay ("scenar");
_root.postavy.push(typHrace);
}
Frame 9
Frame 10
stop();
Frame 12
Frame 67
Frame 68
zobrazVysledek(vysledekBoje);
stop();
Frame 72
stop();
Symbol 19 MovieClip [cakanec] Frame 1
stop();
Symbol 24 MovieClip [poklad] Frame 1
stop();
Symbol 26 MovieClip [rozhozeny] Frame 1
stop();
Symbol 37 MovieClip Frame 1
stop();
Symbol 41 MovieClip Frame 1
stop();
Symbol 42 MovieClip Frame 1
function nahod(rozhoz, zran) {
if (rozhoz > 0) {
streh.play();
streh.h2.textik.text = rozhoz;
streh.h1.textik.text = _parent.streh;
_parent.ukazSloupec(1);
}
if (zran > 0) {
zivotu.play();
zivotu.h2.textik.text = zran;
zivotu.h1.textik.text = _parent.zivotu;
_parent.ukazSloupec(2);
}
}
function zvyrazni(kolik) {
if (!kolik) {
_alpha = _parent._parent.viditelnostStitku;
} else {
_alpha = 100;
}
}
stop();
Symbol 46 MovieClip Frame 1
stop();
Symbol 230 MovieClip Frame 1
stop();
Symbol 230 MovieClip Frame 21
p.gotoAndStop(2);
Symbol 230 MovieClip Frame 22
p.gotoAndStop(2);
Symbol 233 MovieClip Frame 1
_visible = false;
stop();
Symbol 235 MovieClip Frame 9
stop();
Symbol 236 MovieClip Frame 3
stop();
Symbol 238 MovieClip Frame 16
stop();
Symbol 239 MovieClip Frame 1
function zapal(kolik) {
var _local2;
var _local3 = 1;
while (_local3 <= kolik) {
_local2 = p0.duplicateMovieClip("p" + _local3, this.getNextHighestDepth());
_local2._visible = true;
_local2._x = (p0._x + random(20)) - random(20);
_local2._y = (p0._y + random(20)) - random(20);
_local2._xscale = p0._xscale * ((random(2) * 2) - 1);
_local2._yscale = (p0._yscale + random(20)) - random(20);
_local2.gotoAndPlay(random(_local3) + 1);
_local3++;
}
}
p0._visible = false;
Symbol 243 MovieClip [figurka] Frame 1
function nastav(typ, strana, smerX, smerY, obnoveni) {
var _local3;
var _local6;
this.typ = typ;
this.strana = strana;
if (strana > 1) {
_local3 = 11;
} else {
_local3 = 21;
}
stavy.zivotup.gotoAndStop(_local3);
obnovStav(1);
if (obnoveni) {
obnovStav(2);
}
p.podst.gotoAndStop(strana);
natocSe(smerX, smerY);
if (_parent.stavyZmiz) {
stavy._visible = false;
} else {
stavy._visible = true;
}
}
function neni() {
if (((zivotu <= 0) || (utekl)) || (mimo)) {
return(true);
}
return(false);
}
function rychlost() {
var _local3 = _root.typyPotvor[this.typ].rychlost;
if (_local3 > this.zivotu) {
_local3 = this.zivotu;
}
return(_local3);
}
function muzeStrilet() {
var _local5;
if (strana == 1) {
_local5 = 2;
} else {
_local5 = 1;
}
var _local4 = _root.typyPotvor[this.typ].shoot;
if (_parent.pocetKontaktu(this.posX, this.posY, _local5)) {
return(0);
}
if (!_local4) {
return(0);
}
if (_local4 > kroku) {
return(-1);
}
return(_local4);
}
function muzeInflamovat() {
var _local5;
if (strana == 1) {
_local5 = 2;
} else {
_local5 = 1;
}
var _local4 = _root.typyPotvor[this.typ].inflame;
if (_parent.pocetKontaktu(this.posX, this.posY, _local5)) {
return(0);
}
if (!_local4) {
return(0);
}
if (_local4 > kroku) {
return(-1);
}
return(_local4);
}
function muzeSpalit() {
var _local5;
if (strana == 1) {
_local5 = 2;
} else {
_local5 = 1;
}
var _local4 = _root.typyPotvor[this.typ].burn;
if (_parent.pocetKontaktu(this.posX, this.posY, _local5)) {
return(0);
}
if (!_local4) {
return(0);
}
if (_local4 > kroku) {
return(-1);
}
return(_local4);
}
function nastavUzTahnul(jak) {
this.uzTahnul = jak;
}
function zvetsiStav(jakej, kolik) {
var _local2;
if (jakej == 1) {
_local2 = "streh";
} else {
_local2 = "zivotu";
}
this[_local2 + ""] = Number(this[_local2 + ""]) + Number(kolik);
var _local3 = stavy[_local2 + ""].h1.textik.text;
stavy[_local2 + ""].h1.textik.text = Number(_local3) + kolik;
}
function zmenStav(jakej, kolik) {
var _local2;
if (jakej == 1) {
_local2 = "streh";
} else {
_local2 = "zivotu";
}
this[_local2 + ""] = kolik;
stavy[_local2 + ""].h1.textik.text = kolik;
ukazSloupec(jakej);
}
function ukazSloupec(jakej) {
var _local3;
if (jakej == 1) {
_local3 = "streh";
} else {
_local3 = "zivotu";
}
var _local2;
var _local4;
if (jakej == 1) {
_local2 = 0;
} else if (strana == 1) {
_local2 = 20;
} else {
_local2 = 10;
}
_local4 = _local2 + (10 - ((this[_local3] / maxStav(jakej)) * 10));
if (_local4 == _local2) {
_local4 = _local2 + 1;
}
stavy[_local3 + "p"].gotoAndStop(_local4);
}
function natocSe(sX, sY) {
var _local3 = _root.typyPotvor[this.typ].postava;
if (sY < 0) {
p.gotoAndStop(_local3 * 2);
} else {
p.gotoAndStop((_local3 * 2) - 1);
}
if ((-1 * sX) == sY) {
p.p._xscale = 1 * Math.abs(p.p._xscale);
} else {
p.p._xscale = -1 * Math.abs(p.p._xscale);
}
}
function cakej(kolik) {
if (!_root.krev) {
return(0);
}
krev._visible = true;
krev.gotoAndPlay(2);
if (kolik < 6) {
return(1);
}
krev2._visible = true;
krev2.gotoAndPlay(2);
return(2);
}
function obnovStav(jakej) {
zmenStav(jakej, maxStav(jakej));
}
function maxStav(jakej) {
var _local2;
if (jakej == 1) {
_local2 = _root.typyPotvor[typ].boj;
if (_root["HLAVNIHRDINA" + strana] == cislo) {
_local2 = _local2 + _root.bonusStreh;
}
} else {
_local2 = _root.typyPotvor[typ].sila;
if (_root["HLAVNIHRDINA" + strana] == cislo) {
_local2 = _local2 + _root.bonusZivotu;
}
}
return(_local2);
}
function napor() {
gotoAndPlay ("utok");
cinnost = 2;
cinnost1 = 2;
kSouperi(4);
}
function utok() {
gotoAndPlay ("utok");
cinnost = 3;
cinnost1 = 3;
kSouperi();
}
function strelba() {
gotoAndPlay ("strelba");
cinnost = 4;
cinnost1 = 4;
kSouperi();
}
function kryt() {
gotoAndPlay ("kryt");
cinnost = -4;
cinnost1 = -4;
kSouperi();
}
function obrana() {
gotoAndPlay ("obrana");
cinnost = -3;
cinnost1 = -3;
kSouperi();
}
function inflamuj(koho) {
cinnost = 5;
cinnost1 = 5;
gotoAndPlay ("inflame");
koho.cinnost = -5;
koho.cinnost1 = -5;
koho.gotoAndPlay("inflameGet");
koho.zvetsiStav(1, random(10) + 1);
}
function spal(koho) {
cinnost = 6;
cinnost1 = 6;
gotoAndPlay ("spal");
koho.cinnost = -6;
koho.cinnost1 = -6;
koho.y0 = koho.p._y;
koho.gotoAndPlay("spalSe");
}
function posun(sx, sy) {
gotoAndPlay ("posun");
zac = _x;
i = 0;
smerPohybuX = sx;
smerPohybuY = sy;
_parent.natocSe(this, sx, sy);
cinnost = 1;
cinnost1 = 1;
}
function zemri() {
stavy._visible = false;
_parent.uvolni(this);
gotoAndPlay ("smrt");
zivotu = 0;
var _local4;
if (strana == 1) {
_local4 = 2;
} else {
_local4 = 1;
}
if (_parent["zlodej" + _local4] == this.cislo) {
_parent["zlodej" + _local4] = 0;
_parent["poklad" + _local4]._visible = true;
_parent["poklad" + _local4]._x = _parent.pixelX(posX, posY);
_parent["poklad" + _local4]._y = _parent.pixelY(posX, posY);
_parent[("POKLAD" + _local4) + "X"] = posX;
_parent[("POKLAD" + _local4) + "Y"] = posY;
}
if (_parent["HRAC" + _local4]) {
if (!_parent["HRAC" + strana]) {
_root.skore = _root.skore + (10 * _root.typyPotvor[this.cislo].zkusenost);
}
if (souper.cislo == 1) {
_root.zkusenostTed = _root.zkusenostTed + _root.typyPotvor[this.cislo].zkusenost;
trace("zkusenost ted je " + _root.zkusenostTed);
trace("zkusenost clkem je " + _root.zkusenost);
}
}
}
function zmiz() {
stavy._visible = false;
_parent.uvolni(this);
gotoAndPlay ("zmizeni");
}
function kSouperi(multip) {
if (souper.posX < this.posX) {
smerPohybuX = -1;
} else if (souper.posX > this.posX) {
smerPohybuX = 1;
} else {
smerPohybuX = 0;
}
if (souper.posY < this.posY) {
smerPohybuY = -1;
} else if (souper.posY > this.posY) {
smerPohybuY = 1;
} else {
smerPohybuY = 0;
}
if (multip) {
multi = multip;
} else {
multi = 1;
}
x0 = p._x;
y0 = p._y;
xp0 = podst._x;
yp0 = podst._y;
}
function pohlavi() {
return(_root.typyPotvor[this.typ].pohlavi);
}
this.onEnterFrame = function () {
var _local5;
var _local4;
if (!cinnost) {
return(0);
}
if (!cinnost1) {
if (neni()) {
if (!zivotu) {
zemri();
} else if (utekl) {
zmiz();
}
_parent.pokracuj();
cinnost = 0;
if (strana == _parent.naTahu) {
_parent.dalsiFigurka(strana);
}
kroku = 0;
nastavUzTahnul();
_parent.casNaUstup = 0;
return(0);
}
if ((cinnost == 2) || (cinnost == 3)) {
if ((_parent.tahnouci.kroku > 0) && (!souper.neni())) {
var _local3 = souper;
retreat._visible = true;
retreat.gotoAndPlay(1);
_parent.casNaUstup = 30;
trace("CAS NA USTUP!");
_parent.tahnouci0 = this;
_parent.kdoTahne = this.cislo;
_parent.tahnouci = _local3;
_parent.tahnouci.kroku = 1;
}
}
if (cinnost >= 0) {
_parent.pokracuj();
}
cinnost = 0;
_parent.ukazMoznosti();
return(0);
}
if (!(cinnost === 1)) {
} else if (i < posunyX.length) {
if (smerPohybuX > 0) {
_x = (_x + posunyX[i]);
} else if (smerPohybuX < 0) {
_x = (_x - posunyX[i]);
}
if (smerPohybuY > 0) {
_y = (_y + posunyY[i]);
} else if (smerPohybuY < 0) {
_y = (_y - posunyY[i]);
}
i++;
} else {
_local5 = this.posX + (smerPohybuX / Math.abs(smerPohybuX));
_local4 = this.posY + (smerPohybuY / Math.abs(smerPohybuY));
_parent.presun(this, _local5, _local4);
_x = _parent.pixelX(this.posX, this.posY);
_y = _parent.pixelY(this.posX, this.posY);
_parent.rozvrstvi();
cinnost1 = 0;
}
};
posunyX = new Array(0, 3, 7, 10, 10, 10, 10, 10);
posunyY = new Array(0, 2, 4, 7, 7, 7, 7, 6);
obnovStav(1);
obnovStav(2);
if (_root.scenar._visible) {
stin._visible = true;
} else {
stin._visible = false;
}
var posunKrve = 0;
if (_root.typyPotvor[typ].velikost < 2) {
posunKrve = 30;
} else if (_root.typyPotvor[typ].velikost > 2) {
posunKrve = -20;
}
krev._y = krev._y + posunKrve;
krev2._y = krev2._y + posunKrve;
Symbol 243 MovieClip [figurka] Frame 2
stavy.zvyrazni(0);
stop();
Symbol 243 MovieClip [figurka] Frame 3
cinnost1 = 0;
Symbol 243 MovieClip [figurka] Frame 4
ustupuje = false;
Symbol 243 MovieClip [figurka] Frame 5
prevFrame();
Symbol 243 MovieClip [figurka] Frame 21
gotoAndPlay ("streh");
Symbol 243 MovieClip [figurka] Frame 28
p._x = x0 - (6 * smerPohybuX);
p._y = y0 - (4 * smerPohybuY);
Symbol 243 MovieClip [figurka] Frame 29
stavy.nahod(_parent.rozhozeniObrance, _parent.zraneniObrance);
if (_parent.zraneniObrance > 0) {
cakej(_parent.zraneniObrance);
var x = Math.ceil(_parent.zraneniObrance / 4);
if (!zivotu) {
x = x + 5;
_root.zvuky["zasah" + souper.pohlavi()].start();
_root.zvuky["chcip" + this.pohlavi()].start();
} else {
_root.zvuky["zasah" + souper.pohlavi()].start();
_root.zvuky["au" + this.pohlavi()].start();
}
while (x > 0) {
_parent.cakejNaPodlahu(posX, posY);
x--;
}
} else {
_root.zvuky["uder" + this.souper.pohlavi()].start();
}
Symbol 243 MovieClip [figurka] Frame 30
p._x = x0 - (4 * smerPohybuX);
p._y = y0 - (3 * smerPohybuY);
Symbol 243 MovieClip [figurka] Frame 31
p._x = x0 - (2 * smerPohybuX);
p._y = y0 - (1 * smerPohybuY);
Symbol 243 MovieClip [figurka] Frame 32
p._x = x0;
p._y = y0;
Symbol 243 MovieClip [figurka] Frame 33
if (!zivotu) {
gotoAndPlay ("streh");
}
Symbol 243 MovieClip [figurka] Frame 42
p._x = x0 - (6 * smerPohybuX);
p._y = y0 - (4 * smerPohybuY);
Symbol 243 MovieClip [figurka] Frame 44
Symbol 243 MovieClip [figurka] Frame 47
p._x = x0 + (12 * smerPohybuX);
p._y = y0 + (8 * smerPohybuY);
Symbol 243 MovieClip [figurka] Frame 49
p._x = x0 + (8 * smerPohybuX);
p._y = y0 + (6 * smerPohybuY);
Symbol 243 MovieClip [figurka] Frame 50
p._x = x0 + (4 * smerPohybuX);
p._y = y0 + (3 * smerPohybuY);
Symbol 243 MovieClip [figurka] Frame 51
p._x = x0;
p._y = y0;
Symbol 243 MovieClip [figurka] Frame 52
gotoAndPlay ("streh");
Symbol 243 MovieClip [figurka] Frame 53
p._x = x0 - ((6 * smerPohybuX) * multi);
p._y = y0 - ((4 * smerPohybuY) * multi);
Symbol 243 MovieClip [figurka] Frame 56
Symbol 243 MovieClip [figurka] Frame 58
p._x = x0 + ((12 * smerPohybuX) * multi);
p._y = y0 + ((8 * smerPohybuY) * multi);
Symbol 243 MovieClip [figurka] Frame 60
p._x = x0 + ((8 * smerPohybuX) * multi);
p._y = y0 + ((6 * smerPohybuY) * multi);
Symbol 243 MovieClip [figurka] Frame 61
p._x = x0 + ((4 * smerPohybuX) * multi);
p._y = y0 + ((3 * smerPohybuY) * multi);
Symbol 243 MovieClip [figurka] Frame 62
p._x = x0;
p._y = y0;
Symbol 243 MovieClip [figurka] Frame 78
if (souper.zivotu) {
multi = 1;
} else {
multi = 0;
}
p._x = x0 - ((6 * smerPohybuX) * multi);
p._y = y0 - ((4 * smerPohybuY) * multi);
Symbol 243 MovieClip [figurka] Frame 79
if (souper.zivotu) {
stavy.nahod(_parent.rozhozeniUtocnika, _parent.zraneniUtocnika);
if (_parent.zraneniUtocnika > 0) {
cakej(_parent.zraneniUtocnika);
var x = Math.ceil(_parent.zraneniUtocnika / 4);
if (!zivotu) {
x = x + 5;
_root.zvuky["zasah" + souper.pohlavi()].start();
_root.zvuky["chcip" + this.pohlavi()].start();
} else {
_root.zvuky["zasah" + souper.pohlavi()].start();
_root.zvuky["au" + this.pohlavi()].start();
}
while (x > 0) {
_parent.cakejNaPodlahu(posX, posY);
x--;
}
} else {
_root.zvuky["uder" + this.souper.pohlavi()].start();
}
}
Symbol 243 MovieClip [figurka] Frame 80
p._x = x0 - ((4 * smerPohybuX) * multi);
p._y = y0 - ((3 * smerPohybuY) * multi);
Symbol 243 MovieClip [figurka] Frame 81
p._x = x0 - ((2 * smerPohybuX) * multi);
p._y = y0 - ((1 * smerPohybuY) * multi);
Symbol 243 MovieClip [figurka] Frame 82
p._x = x0;
p._y = y0;
Symbol 243 MovieClip [figurka] Frame 83
if (!zivotu) {
gotoAndPlay ("streh");
}
Symbol 243 MovieClip [figurka] Frame 85
Symbol 243 MovieClip [figurka] Frame 86
gotoAndPlay ("streh");
Symbol 243 MovieClip [figurka] Frame 87
Symbol 243 MovieClip [figurka] Frame 103
_root.zvuky.vystrel1.start();
p._x = x0 - ((12 * smerPohybuX) * multi);
p._y = y0 - ((8 * smerPohybuY) * multi);
Symbol 243 MovieClip [figurka] Frame 105
p._x = x0 - ((8 * smerPohybuX) * multi);
p._y = y0 - ((6 * smerPohybuY) * multi);
Symbol 243 MovieClip [figurka] Frame 106
p._x = x0 - ((4 * smerPohybuX) * multi);
p._y = y0 - ((3 * smerPohybuY) * multi);
Symbol 243 MovieClip [figurka] Frame 107
p._x = x0;
p._y = y0;
Symbol 243 MovieClip [figurka] Frame 124
gotoAndPlay ("streh");
Symbol 243 MovieClip [figurka] Frame 145
stavy.nahod(_parent.rozhozeniObrance, _parent.zraneniObrance);
if (_parent.zraneniObrance > 0) {
cakej(_parent.zraneniObrance);
var x = Math.ceil(_parent.zraneniObrance / 4);
if (!zivotu) {
x = x + 5;
_root.zvuky["zasah" + souper.pohlavi()].start();
_root.zvuky["chcip" + this.pohlavi()].start();
} else {
_root.zvuky["au" + this.pohlavi()].start();
}
while (x > 0) {
_parent.cakejNaPodlahu(posX, posY);
x--;
}
}
p._x = x0 - (12 * smerPohybuX);
p._y = y0 - (8 * smerPohybuY);
Symbol 243 MovieClip [figurka] Frame 147
p._x = x0 - (8 * smerPohybuX);
p._y = y0 - (6 * smerPohybuY);
Symbol 243 MovieClip [figurka] Frame 148
p._x = x0 - (4 * smerPohybuX);
p._y = y0 - (2 * smerPohybuY);
Symbol 243 MovieClip [figurka] Frame 149
p._x = x0;
p._y = y0;
Symbol 243 MovieClip [figurka] Frame 150
if (!zivotu) {
gotoAndPlay ("streh");
}
Symbol 243 MovieClip [figurka] Frame 160
gotoAndPlay ("streh");
Symbol 243 MovieClip [figurka] Frame 161
_root.zvuky[("kouzlo" + this.pohlavi()) + "inflame"].start();
Symbol 243 MovieClip [figurka] Frame 187
gotoAndPlay ("streh");
Symbol 243 MovieClip [figurka] Frame 198
ohen.zapal(20);
Symbol 243 MovieClip [figurka] Frame 211
gotoAndPlay ("streh");
Symbol 243 MovieClip [figurka] Frame 212
_root.zvuky[("kouzlo" + this.pohlavi()) + "burn"].start();
Symbol 243 MovieClip [figurka] Frame 230
Symbol 243 MovieClip [figurka] Frame 243
gotoAndPlay ("streh");
Symbol 243 MovieClip [figurka] Frame 260
ohen.zapal(40);
p._y = y0 - 10;
Symbol 243 MovieClip [figurka] Frame 261
p._y = y0 - 20;
Symbol 243 MovieClip [figurka] Frame 262
stavy.nahod(_parent.rozhozeniObrance, _parent.zraneniObrance);
if (_parent.zraneniObrance > 0) {
cakej(_parent.zraneniObrance);
var x = Math.ceil(_parent.zraneniObrance / 4);
if (!zivotu) {
x = x + 5;
_root.zvuky["zasah" + souper.pohlavi()].start();
_root.zvuky["chcip" + this.pohlavi()].start();
} else {
_root.zvuky["au" + this.pohlavi()].start();
}
while (x > 0) {
_parent.cakejNaPodlahu(posX, posY);
x--;
}
}
p._y = y0 - 18;
Symbol 243 MovieClip [figurka] Frame 263
p._y = y0 - 14;
Symbol 243 MovieClip [figurka] Frame 264
p._y = y0 - 10;
Symbol 243 MovieClip [figurka] Frame 265
p._y = y0 - 0;
Symbol 243 MovieClip [figurka] Frame 266
if (!zivotu) {
gotoAndPlay ("streh");
}
Symbol 243 MovieClip [figurka] Frame 270
gotoAndPlay ("streh");
Symbol 243 MovieClip [figurka] Frame 271
Symbol 243 MovieClip [figurka] Frame 272
Symbol 243 MovieClip [figurka] Frame 282
_visible = false;
stop();
Symbol 243 MovieClip [figurka] Frame 283
p._visible = false;
stavy._visible = false;
_root.zvuky.zab.start();
Symbol 243 MovieClip [figurka] Frame 284
var pocet = Math.round(maxStav(2) / 5);
var x = 1;
while (x <= pocet) {
_parent.cakejNaPodlahu(posX, posY);
x++;
}
Symbol 243 MovieClip [figurka] Frame 297
stop();
Symbol 243 MovieClip [figurka] Frame 298
_visible = false;
Symbol 243 MovieClip [figurka] Frame 299
stop();
Symbol 252 MovieClip Frame 1
stop();
Symbol 253 MovieClip Frame 1
var l;
var t;
l = _root.getBytesLoaded();
t = _root.getBytesTotal();
if (!l) {
l = 0;
}
if (!t) {
t = 1;
}
if (l < t) {
pre.gotoAndStop(Math.round((l * 50) / t));
} else {
_parent.play();
}
Symbol 253 MovieClip Frame 2
gotoAndPlay (1);
Symbol 264 MovieClip Frame 1
stop();
Symbol 284 MovieClip Frame 54
stop();
_parent.play();
Symbol 285 MovieClip Frame 1
stop();
Symbol 285 MovieClip Frame 2
stop();
Symbol 285 MovieClip Frame 3
stop();
_parent.play();
Symbol 290 Button
on (press) {
this.startDrag();
}
on (release, releaseOutside) {
this.stopDrag();
}
Symbol 294 Button
on (release) {
skryj();
_root.scenar.play();
}
Symbol 298 Button
on (release) {
skryj();
_root.gotoAndPlay("menu");
}
Symbol 302 Button
on (release) {
posudCoDal();
}
Symbol 317 Button
on (release) {
zkusToZnovu();
}
Symbol 321 Button
on (release) {
_root.zkusenost = _root.zkusenost + _root.zkusenostTed;
_root.zkusenostTed = 0;
pokracujVeScenari();
}
Symbol 326 Button
on (release) {
_root.bonusZivotu = _root.bonusZivotu + 2;
_root.postavy[0].zivotu = _root.postavy[0].zivotu + 2;
pokracujVeScenari();
}
Symbol 327 Button
on (release) {
_root.bonusStreh++;
skryj();
pokracujVeScenari();
}
Symbol 332 Button
on (release) {
_root.scenar.play();
zavri();
}
Symbol 333 Button
on (release) {
_root.scenar.odpocivej();
_root.scenar.druzina.zobraz();
_root.scenar.play();
zavri();
}
Symbol 338 Button
on (release) {
skryj();
_root.bojiste.pokracuj();
}
Symbol 355 MovieClip Frame 1
stop();
Symbol 390 Button
on (release) {
if (!playerName.text.length) {
return(0);
}
skryj();
var strOut = (((((playerName.text + " (") + _root.survivalParty) + ")") + "|") + _root.skore);
var strOut2 = _root.EncrpytString(strOut);
getURL ("http://www.arcadetown.com/squaresandblades/hs.asp?" + strOut2, "_blank");
_root.gotoAndPlay("menu");
}
Symbol 395 MovieClip Frame 1
function posudCoDal() {
if (!_root.mod) {
skryj();
_root.gotoAndPlay("menu");
} else if (_root.mod == 1) {
if (_root.vysledekBoje < 0) {
gotoAndStop ("prohralCoDal");
} else {
gotoAndStop ("vyhralCoDal");
}
} else if (_root.mod == 2) {
gotoAndStop (1);
skryj();
if (_root.vysledekBoje < 0) {
if ((!_root.skore) || (_root.skore < 0)) {
_root.gotoAndPlay("menu");
} else {
_root.prohlas("highScore");
}
} else {
duplicateMovieClip (_root.bojiste.krev, _root.krev, _root.getNextHighestDepth());
_root.krev._visible = false;
if (_root.bojiste.tah < _root.potvory.length) {
_root.skore = _root.skore + (10 * (_root.potvory.length - _root.bojiste.tah));
}
_root.survivalNovyKolo();
}
}
}
function zkusToZnovu() {
_root.nactiDruzinu();
_root.gotoAndPlay("scenar");
zavri();
}
function pokracujVeScenari() {
if (_root.testujUpgrade()) {
_root.prohlas("upgrade");
return(0);
}
_root.ulozDruzinu();
_root.naStrane++;
_root.scenar.naStrane = _root.naStrane;
_root.gotoAndPlay("scenar");
zavri();
}
function zavri() {
_root.bojiste.ukazMenu(true);
_visible = false;
}
function skryj() {
zavri();
}
stop();
Symbol 395 MovieClip Frame 5
if (_root.mod == 2) {
textik = ("- battle " + _root.kolo) + " won!";
} else {
textik = "";
}
Symbol 395 MovieClip Frame 33
if (_root.mod == 2) {
textik = "Your score: " + _root.skore;
} else {
textik = "";
}
Symbol 403 MovieClip Frame 1
function rozsvit(kolik) {
if (kolik) {
prikrov._alpha = 50;
} else {
prikrov._alpha = 0;
}
sviti = kolik;
}
stop();
Symbol 404 MovieClip Frame 1
function sestavSe() {
var _local4;
d0._y = 0;
var _local5 = 1;
while (_local5 <= _parent.DILKUY) {
var _local3 = 1;
while (_local3 <= _parent.DILKUX) {
_local4 = d0.duplicateMovieClip((("d" + _local3) + "_") + _local5, this.getNextHighestDepth());
_local4._x = d0._x + ((_local3 - 1) * _local4.plocha._width);
_local4._y = d0._y + ((_local5 - 1) * _local4.plocha._height);
if (_parent.jeCerna(_local3, _local5)) {
_local4.gotoAndStop(2);
}
_local3++;
}
_local5++;
}
d0._visible = false;
}
function ukazNeco() {
var _local4 = 1;
while (_local4 <= _parent.DILKUY) {
var _local3 = 1;
while (_local3 <= _parent.DILKUX) {
this[(("d" + _local3) + "_") + _local4].barva = _parent.cesty[_local3 - 1][_local4 - 1];
_local3++;
}
_local4++;
}
}
function odkrejPrikrovy() {
var _local4 = 1;
while (_local4 <= _parent.DILKUY) {
var _local3 = 1;
while (_local3 <= _parent.DILKUX) {
this[(("d" + _local3) + "_") + _local4].rozsvit(0);
this[(("d" + _local3) + "_") + _local4].gotoAndStop(((((_local3 >> 1) << 1) == _local3) == (((_local4 >> 1) << 1) == _local4)) + 1);
_local3++;
}
_local4++;
}
}
function zazelenej(x, y, stav) {
this[(("d" + x) + "_") + y].rozsvit(stav);
}
sestavSe();
stop();
Symbol 435 Button
on (rollOver) {
gotoAndStop ("1");
}
on (rollOut) {
gotoAndStop ("zacatek");
}
on (release) {
_parent.gotoAndPlay("help");
}
Symbol 436 Button
on (rollOver) {
gotoAndStop ("2");
}
on (rollOut) {
gotoAndStop ("zacatek");
}
on (release) {
_root.naStrane = 1;
_root.mod = 1;
_parent.gotoAndPlay("volbaHrdiny");
}
Symbol 437 Button
on (rollOver) {
gotoAndStop ("3");
}
on (rollOut) {
gotoAndStop ("zacatek");
}
on (release) {
_root.mod = 0;
_parent.gotoAndPlay("random");
}
Symbol 438 Button
on (rollOver) {
gotoAndStop ("4");
}
on (rollOut) {
gotoAndStop ("zacatek");
}
on (release) {
_parent.gotoAndPlay("settings");
}
Symbol 439 Button
on (rollOver) {
gotoAndStop ("5");
}
on (rollOut) {
gotoAndStop ("zacatek");
}
on (release) {
_parent.gotoAndPlay("credits");
}
Symbol 440 Button
on (rollOver) {
gotoAndStop ("6");
}
on (rollOut) {
gotoAndStop ("zacatek");
}
on (release) {
getURL ((("http://www.arcadetown.com/index.asp?gameid=squaresandblades&aid=" + _root.GetUrlParam(_url, "aid=")) + "&refer=") + _root.GetBaseUrl(_url), "_blank");
}
Symbol 441 Button
on (rollOver) {
gotoAndStop ("7");
}
on (rollOut) {
gotoAndStop ("zacatek");
}
on (release) {
_root.mod = 2;
_root.kolo = 0;
_root.skore = 0;
_root.survivalParty = "";
_parent.gotoAndPlay("survival");
}
Symbol 442 Button
on (rollOver) {
gotoAndStop ("8");
}
on (rollOut) {
gotoAndStop ("zacatek");
}
on (release) {
getURL ("http://www.arcadetown.com/free_content/index.asp", "_blank");
}
Symbol 450 MovieClip Frame 8
stop();
Symbol 456 MovieClip Frame 1
cyklus = random(4) + 4;
Symbol 456 MovieClip Frame 21
cyklus--;
if (cyklus >= 1) {
gotoAndPlay (2);
}
Symbol 466 Button
on (rollOver) {
gotoAndStop ("nad");
}
on (rollOut) {
gotoAndStop ("normalka");
}
on (release) {
getURL ((("http://www.arcadetown.com/index.asp?gameid=squaresandblades&aid=" + _root.GetUrlParam(_url, "aid=")) + "&refer=") + _root.GetBaseUrl(_url), "_blank");
}
Symbol 469 MovieClip Frame 6
stop();
Symbol 476 MovieClip Frame 1
stop();
Symbol 477 Button
on (release) {
_root.typHrace = 1;
play();
}
Symbol 478 Button
on (release) {
_root.typHrace = 3;
play();
}
Symbol 479 Button
on (release) {
_root.typHrace = 2;
play();
}
Symbol 480 Button
on (release) {
_root.typHrace = 5;
play();
}
Symbol 481 Button
on (release) {
gotoAndPlay ("zacatek");
}
Symbol 485 Button
on (release) {
nextFrame();
}
Symbol 489 Button
on (release) {
gotoAndStop ("movement");
}
Symbol 490 Button
on (release) {
gotoAndStop ("qualities");
}
Symbol 491 Button
on (release) {
gotoAndStop ("attack");
}
Symbol 492 Button
on (release) {
gotoAndStop ("strike");
}
Symbol 493 Button
on (release) {
gotoAndStop ("conclusion");
}
Symbol 509 MovieClip Frame 1
stop();
Symbol 552 MovieClip Frame 1
DILKUX = 3;
DILKUY = 3;
_root.zacni();
Symbol 552 MovieClip Frame 2
dlazba.odkrejPrikrovy();
Symbol 552 MovieClip Frame 3
fig1._visible = false;
dlazba.odkrejPrikrovy();
dlazba.zazelenej(2, 2, true);
nextFrame();
Symbol 552 MovieClip Frame 4
fig1._visible = true;
fig1.nastav(2, 1, -1, 1, true);
stop();
Symbol 552 MovieClip Frame 5
dlazba.zazelenej(1, 1, true);
dlazba.zazelenej(1, 3, true);
dlazba.zazelenej(3, 1, true);
dlazba.zazelenej(3, 3, true);
Symbol 552 MovieClip Frame 8
fig1.natocSe(1, 1);
fig2._visible = false;
dlazba.zazelenej(1, 1, false);
dlazba.zazelenej(1, 3, false);
dlazba.zazelenej(3, 1, false);
dlazba.zazelenej(3, 3, false);
dlazba.zazelenej(3, 2, true);
nextFrame();
Symbol 552 MovieClip Frame 9
fig2._visible = true;
fig2.nastav(17, 2, -1, 1, true);
dlazba.zazelenej(2, 2, false);
dlazba.zazelenej(3, 2, false);
Symbol 552 MovieClip Frame 17
fig2._visible = false;
nextFrame();
Symbol 552 MovieClip Frame 18
fig2._visible = true;
fig2.nastav(17, 2, 1, -1, true);
Symbol 552 MovieClip Frame 19
fig1.stavy.streh.h1.textik.text = 0;
Symbol 552 MovieClip Frame 21
fig1.stavy.streh.h1.textik.text = fig1.streh;
Symbol 552 MovieClip Frame 24
fig1._visible = false;
fig2._visible = false;
nextFrame();
Symbol 552 MovieClip Frame 25
fig1._visible = true;
fig1.nastav(1, 1, -1, 1, true);
fig2._visible = true;
fig2.nastav(18, 2, 1, 1, true);
Symbol 552 MovieClip Frame 27
fig1.stavy.streh.h1.textik.text = Number(fig1.streh - 6);
Symbol 552 MovieClip Frame 29
fig2.stavy.streh.h1.textik.text = 0;
fig2.stavy.zivotu.h1.textik.text = Number(fig2.zivotu - 1);
Symbol 552 MovieClip Frame 32
fig1.natocSe(1, -1);
Symbol 552 MovieClip Frame 37
fig1._visible = false;
fig2._visible = false;
nextFrame();
Symbol 552 MovieClip Frame 38
fig1._visible = true;
fig1.nastav(3, 1, -1, 1, true);
fig2._visible = true;
fig2.nastav(17, 2, 1, 1, true);
Symbol 552 MovieClip Frame 40
fig1.stavy.streh.h1.textik.text = Number(fig1.streh - 5);
fig2.stavy.streh.h1.textik.text = Number(fig2.streh - 5);
Symbol 553 Button
on (release) {
_root.mod = undefined;
gotoAndPlay ("zacatek");
}
Symbol 556 Button
on (release) {
if (_root.udelatkoBarva == 2) {
_root.udelatkoBarva = 1;
} else {
_root.udelatkoBarva = 2;
}
zobraz();
}
Symbol 557 Button
on (release) {
if (_root.udelatkoMnozstvi == 2) {
_root.udelatkoMnozstvi = 1;
} else {
_root.udelatkoMnozstvi = 2;
}
zobraz();
}
Symbol 560 MovieClip Frame 1
stop();
Symbol 563 MovieClip Frame 1
stop();
Symbol 564 MovieClip Frame 1
stop();
Symbol 565 MovieClip Frame 1
function zobraz() {
napisMnozstvi.gotoAndStop(_root.udelatkoMnozstvi);
f2._visible = _root.udelatkoMnozstvi - 1;
napisBarva.gotoAndStop(_root.udelatkoBarva);
f1.gotoAndStop(_root.udelatkoBarva);
f2.gotoAndStop(_root.udelatkoBarva);
}
zobraz();
stop();
Instance of Symbol 564 MovieClip "f2" in Symbol 565 MovieClip Frame 1
/* no clip actions */
Symbol 567 Button
on (release) {
_root.naverbuj(0, 2, _root.postavy);
_root.naverbuj(2, random(5) + 5, _root.potvory);
defaultuj();
_root.HRAC1 = 1;
_root.HRAC2 = 0;
_root.DILKUX = 11;
_root.DILKUY = 9;
_root.POKLAD2 = 1;
_root.POKLAD2X = 11;
_root.POKLAD2Y = 5;
_root.RAZENI1X = -1;
_root.RAZENI1Y = 0;
_root.RAZENI2X = 1;
_root.RAZENI2Y = -1;
_root.UTEK1 = 4;
_root.poucka = "thieves";
rozjedTo();
}
Symbol 568 Button
on (release) {
var x;
var pocet = (4 + random(4));
_root.potvory.push(18);
x = 1;
while (x <= pocet) {
_root.potvory.push(17);
x++;
}
_root.naverbuj(1, 2 + random(3), _root.postavy);
defaultuj();
_root.VIP2 = 1;
_root.HRAC1 = 1;
_root.HRAC2 = 0;
_root.poucka = "killTheCaptain";
rozjedTo();
}
Symbol 569 Button
on (release) {
nasad(1, true, false);
_root.naverbuj(2, 6 + random(5), _root.potvory);
defaultuj();
_root.HLAVNIHRDINA1 = 1;
_root.HRAC1 = 1;
_root.HRAC2 = 0;
_root.poucka = "defendTheLord";
rozjedTo();
}
Symbol 570 Button
on (release) {
_root.postavy.push(29);
_root.postavy.push(random(2) + 2);
_root.naverbuj(2, 3 + random(3), _root.potvory);
defaultuj();
_root.HRAC1 = 1;
_root.HRAC2 = 0;
_root.VIP1 = 1;
_root.DILKUX = 11;
_root.DILKUY = 9;
_root.RAZENI1X = -1;
_root.RAZENI1Y = 0;
_root.RAZENI2X = 1;
_root.RAZENI2Y = 0;
_root.UTEK1 = 2;
_root.UTEK2 = 2;
_root.poucka = "runWithTheLady";
rozjedTo(true);
}
Symbol 571 Button
on (release) {
_root.naverbuj(0, 1, _root.postavy);
_root.naverbuj(0, 1, _root.potvory);
defaultuj();
rozjedTo();
}
Symbol 572 Button
on (rollOver) {
gotoAndStop (3);
}
on (rollOut) {
gotoAndStop (2);
}
on (release) {
_root.naverbuj(1, zakladPostav() + random(4), _root.postavy);
_root.naverbuj(2, zakladPotvor() + random(5), _root.potvory);
defaultuj();
rozjedTo(true);
}
Symbol 573 Button
on (rollOver) {
gotoAndStop (3);
}
on (rollOut) {
gotoAndStop (2);
}
on (release) {
_root.naverbuj(2, zakladPotvor() + random(5), _root.postavy);
_root.naverbuj(2, zakladPotvor() + random(5), _root.potvory);
defaultuj();
rozjedTo(true);
}
Symbol 574 Button
on (rollOver) {
gotoAndStop (3);
}
on (rollOut) {
gotoAndStop (2);
}
on (release) {
_root.naverbuj(1, zakladPostav() + random(4), _root.postavy);
_root.naverbuj(1, zakladPostav() + random(4), _root.potvory);
defaultuj();
rozjedTo(true);
}
Symbol 580 MovieClip Frame 1
function nasad(kolik, prvni, druhej, bezPoucky) {
var _local2;
var _local3;
if (prvni) {
_local3 = armady[kolik * 2];
_local2 = 0;
while (_local2 < _local3.length) {
if (!_local3[_local2]) {
_local2++;
}
_root.postavy.push(_local3[_local2]);
_local2++;
}
}
if (druhej) {
_local3 = armady[(kolik * 2) + 1];
_local2 = 0;
while (_local2 < _local3.length) {
if (!_local3[_local2]) {
_local2++;
}
_root.potvory.push(_local3[_local2]);
_local2++;
}
}
if (bezPoucky) {
_root.poucka = "";
} else {
_root.poucka = poucky[kolik];
}
}
function zakladPostav() {
if (_root.udelatkoMnozstvi > 1) {
return(3);
}
return(1);
}
function zakladPotvor() {
if (_root.udelatkoMnozstvi > 1) {
return(6);
}
return(3);
}
function rozjedTo(podleUdelatka) {
if (podleUdelatka) {
if (_root.udelatkoBarva == 1) {
_root.HRAC1 = 1;
_root.HRAC2 = 0;
} else {
_root.HRAC1 = 0;
_root.HRAC2 = 1;
}
}
_root.gotoAndPlay("game");
}
function defaultuj() {
_root.DILKUX = (9 + (2 * random(2))) - (2 * random(2));
_root.DILKUY = 9;
_root.RAZENI1X = random(3) - 1;
_root.RAZENI2X = _root.RAZENI1X * -1;
_root.RAZENI1Y = (random(2) * 2) - 1;
_root.RAZENI2Y = _root.RAZENI1Y * -1;
_root.HRAC1 = 1;
_root.HRAC2 = 0;
_root.POKLAD1 = 0;
_root.POKLAD1X = 0;
_root.POKLAD1Y = 0;
_root.POKLAD2 = 0;
_root.POKLAD2X = 0;
_root.POKLAD2Y = 0;
_root.HLAVNIHRDINA1 = 0;
_root.HLAVNIHRDINA2 = 0;
_root.VIP1 = 0;
_root.VIP2 = 0;
_root.UTEK1 = random(6);
_root.UTEK2 = random(6);
_root.MORALKA1 = 0;
_root.MORALKA2 = 0;
_root.POSILA1CAS = 0;
_root.POSILA2CAS = 0;
_root.poucka = "";
}
armady = new Array(new Array(), new Array(), new Array(0, 2, 12, 12, 12), new Array());
while (_root.postavy.length) {
_root.postavy.pop();
}
while (_root.potvory.length) {
_root.potvory.pop();
}
Symbol 580 MovieClip Frame 2
stop();
Symbol 582 Button
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
gotoAndStop (1);
}
on (release) {
_root.postavy.push(2, 5, 10, 10);
_root.survivalParty = "Scouts";
_root.survivalNovyKolo();
}
Symbol 583 Button
on (rollOver) {
gotoAndStop (3);
}
on (rollOut) {
gotoAndStop (1);
}
on (release) {
_root.postavy.push(3, 10, 13, 9);
_root.survivalParty = "Dwarves";
_root.survivalNovyKolo();
}
Symbol 584 Button
on (rollOver) {
gotoAndStop (4);
}
on (rollOut) {
gotoAndStop (1);
}
on (release) {
_root.postavy.push(4, 1, 1);
_root.survivalParty = "Amazons";
_root.survivalNovyKolo();
}
Symbol 585 Button
on (rollOver) {
gotoAndStop (5);
}
on (rollOut) {
gotoAndStop (1);
}
on (release) {
_root.postavy.push(18, 23, 19, 23, 17, 17);
_root.survivalParty = "Rebels";
_root.survivalNovyKolo();
}
Symbol 590 MovieClip Frame 1
stop();
Symbol 591 Button
on (release) {
getURL ("http://www.arcadetown.com/squaresandblades/view_high_scores.asp", "_blank");
}
Symbol 594 Button
on (release) {
if (_root.krev < 2) {
_root.krev++;
} else {
_root.krev = 0;
}
zobraz();
}
Symbol 595 Button
on (release) {
_root.napoveda = !_root.napoveda;
zobraz();
}
Symbol 596 Button
on (release) {
if (_root.ticho) {
_root.ticho = false;
} else {
_root.ticho = true;
}
_root.hudboHraj(_root.typHudby);
zobraz();
}
Symbol 597 Button
on (release) {
if (_root.diff < 2) {
_root.diff = 2;
} else {
_root.diff = 1;
}
zobraz();
}
Symbol 602 MovieClip Frame 1
stop();
Symbol 606 MovieClip Frame 1
stop();
Symbol 611 MovieClip Frame 1
stop();
Symbol 614 MovieClip Frame 1
stop();
Symbol 615 MovieClip Frame 1
function zobraz() {
krev.gotoAndStop(3 - _root.krev);
napoveda.gotoAndStop(2 - _root.napoveda);
hudba.gotoAndStop(Number(_root.ticho) + 1);
diff.gotoAndStop(_root.diff);
}
zobraz();
Symbol 617 Button
on (release) {
getURL ("http://www.flashgamesponsorship.com/", "_blank");
}
Symbol 621 Button
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
gotoAndStop (1);
}
on (release) {
getURL ("http://www.thunderbird.cz/", "_blank");
}
Symbol 629 MovieClip Frame 1
stop();
Symbol 631 MovieClip Frame 1
stop();
Symbol 632 MovieClip Frame 1
stop();
Symbol 644 MovieClip Frame 1
DILKUX = 14;
DILKUY = 13;
_root.zacni();
Symbol 644 MovieClip Frame 2
dlazba.odkrejPrikrovy();
if (_root.typHudby != 1) {
_root.hudboHraj(1);
}
if (_root.mod == 0) {
gotoAndPlay ("random");
}
Symbol 644 MovieClip Frame 5
stop();
Symbol 644 MovieClip Frame 9
stop();
Symbol 644 MovieClip Frame 10
postavy.gotoAndStop(1 + _root.typHrace);
_root.zvukPozadi.stop();
Symbol 644 MovieClip Frame 29
stop();
_parent.gotoAndPlay("predGame");
Symbol 644 MovieClip Frame 32
stop();
Symbol 644 MovieClip Frame 36
stop();
Symbol 644 MovieClip Frame 37
surv.cacheAsBitmap = true;
Symbol 644 MovieClip Frame 40
surv.cacheAsBitmap = false;
stop();
Symbol 644 MovieClip Frame 44
stop();
Symbol 644 MovieClip Frame 48
stop();
Symbol 646 MovieClip Frame 1
this.onMouseDown = function () {
this.klik = 1;
};
this.onMouseUp = function () {
this.klik = 0;
};
jak = 2;
stop();
Symbol 646 MovieClip Frame 3
Symbol 646 MovieClip Frame 9
if (this.klik) {
jak = 3;
}
_parent.cinnost.x = moznostX;
_parent.cinnost.y = moznostY;
_parent.proved(_parent.tahnouci, _parent.cinnost.x, _parent.cinnost.y, jak);
Symbol 649 MovieClip Frame 1
function rozsvit(kolik) {
sviti = kolik;
if (sviti) {
_alpha = 100;
} else {
_alpha = 50;
}
}
stop();
Symbol 650 Button
on (rollOver) {
gotoAndPlay ("on");
_parent.vysvetli("menu" + this.cislo);
}
on (rollOut) {
gotoAndPlay ("off");
_parent.vysvetli("");
}
on (release) {
_parent.menuAkce(this.cislo);
}
Symbol 654 MovieClip Frame 2
stop();
Symbol 654 MovieClip Frame 4
stop();
Symbol 692 MovieClip Frame 1
stop();
Symbol 692 MovieClip Frame 5
var s = sila;
if (!s) {
specif = "NO SPECIAL EFECT HERE";
} else {
specif = ("-" + s) + " to guard for both";
}
Symbol 692 MovieClip Frame 26
if (k > 1) {
specif = ("( " + k) + " steps )";
} else {
specif = ("( " + k) + " step )";
}
Symbol 692 MovieClip Frame 30
if (k > 1) {
specif = ("( " + k) + " steps )";
} else {
specif = ("( " + k) + " step )";
}
Symbol 692 MovieClip Frame 35
if (k > 1) {
specif = ("( " + k) + " steps )";
} else {
specif = ("( " + k) + " step )";
}
Symbol 695 MovieClip Frame 1
function prijmiPodminky() {
DILKUX = _root.DILKUX;
DILKUY = _root.DILKUY;
HRAC1 = _root.HRAC1;
HRAC2 = _root.HRAC2;
HLAVNIHRDINA1 = _root.HLAVNIHRDINA1;
HLAVNIHRDINA2 = _root.HLAVNIHRDINA2;
VIP1 = _root.VIP1;
VIP2 = _root.VIP2;
POKLAD1 = _root.POKLAD1;
POKLAD2 = _root.POKLAD2;
POKLAD1X = _root.POKLAD1X;
POKLAD1Y = _root.POKLAD1Y;
POKLAD2X = _root.POKLAD2X;
POKLAD2Y = _root.POKLAD2Y;
UTEK1 = _root.UTEK1;
UTEK2 = _root.UTEK2;
MORALKA1 = _root.MORALKA1;
MORALKA2 = _root.MORALKA2;
RAZENI1X = _root.RAZENI1X;
RAZENI1Y = _root.RAZENI1Y;
RAZENI2X = _root.RAZENI2X;
RAZENI2Y = _root.RAZENI2Y;
POSILA1X = _root.POSILA1X;
POSILA1Y = _root.POSILA1Y;
POSILA1CAS = _root.POSILA1CAS;
POSILA2X = _root.POSILA2X;
POSILA2Y = _root.POSILA2Y;
POSILA2CAS = _root.POSILA2CAS;
poucka = _root.poucka;
}
function urciZraneni(strana) {
var _local6 = this["armada" + strana];
var _local4 = this["iniciala" + strana];
var _local5;
var _local3;
_local5 = _root.zraneni.length;
_local3 = 0;
while (_local3 < _local5) {
_root.zraneni.pop();
_local3++;
}
_local5 = _local6.length;
_local3 = 0;
while (_local3 < _local5) {
_local6.pop();
_local3++;
}
_local3 = 1;
while (_local3 <= _local5) {
if (this[_local4 + _local3].zivotu) {
_local6.push(this[_local4 + _local3].typ);
trace((("Ukladam k " + _root.typyPotvor[this[_local4 + _local3].typ].jmeno) + " zraneni ") + (this[_local4 + _local3].maxStav(2) - this[_local4 + _local3].zivotu));
_root.zraneni.push(this[_local4 + _local3].maxStav(2) - this[_local4 + _local3].zivotu);
}
_local3++;
}
}
function aplikujZraneni(strana) {
var _local3;
var _local8;
var _local5;
var _local4;
var _local6;
_local5 = this["armada" + strana];
_local4 = this["iniciala" + strana];
_local6 = _root.zraneni.length;
trace("aplikuju zraneni");
_local3 = 0;
while (_local3 < _local5.length) {
trace(((("Ubiram od " + _root.typyPotvor[this[_local4 + (_local3 + 1)].typ].jmeno) + " na zacatku ") + _root.zraneni[_local3]) + " zivotu.");
if (_root.zraneni[_local3]) {
this[_local4 + (_local3 + 1)].zvetsiStav(2, -1 * _root.zraneni[_local3]);
}
_local3++;
}
}
function Zalezitost2D() {
this.x = 0;
this.y = 0;
this.typ = 0;
}
function testujBytosti() {
vysvetleni = 0;
bytost = 0;
var _local2;
var _local4 = 1;
while (_local4 < 3) {
var _local3 = 1;
while (_local3 <= this["armada" + _local4].length) {
_local2 = this[this["iniciala" + _local4] + _local3];
if (((((naTahu == _local2.strana) && (_local2.cislo == kdoTahne)) && (!_local2.uzTahnul)) || (_local2.cinnost)) || ((_local2.posX == nadX) && (_local2.posY == nadY))) {
_local2.stavy.zvyrazni(1);
} else {
_local2.stavy.zvyrazni(0);
}
_local3++;
}
_local4++;
}
}
function pokracuj() {
pokracovat = true;
}
function stuj() {
pokracovat = false;
}
function ukazMoznosti(komu) {
var _local5 = komu;
if (!komu) {
_local5 = tahnouci;
}
var _local2;
var _local3;
var _local7;
var _local4;
var _local6 = 0;
_local3 = 1;
while (_local3 <= DILKUY) {
_local2 = 1;
while (_local2 <= DILKUX) {
dlazba[(("d" + _local2) + "_") + _local3].rozsvit(0);
_local2++;
}
_local3++;
}
if (!tahnouci.hrac) {
return(0);
}
if (komu == -1) {
return(0);
}
_local3 = 1;
while (_local3 <= DILKUY) {
_local2 = 1;
while (_local2 <= DILKUX) {
_local4 = lzeKontaktovat(_local5, _local2, _local3);
if (!_local4) {
_local4 = lzeAkcnit(_local5, _local2, _local3);
}
if (_local4) {
if (_local5 == tahnouci) {
dlazba[(("d" + _local2) + "_") + _local3].rozsvit(_local4);
}
if (_local4 != 3) {
_local6++;
}
} else if (_local5 == tahnouci) {
dlazba[(("d" + _local2) + "_") + _local3].rozsvit(0);
}
_local2++;
}
_local3++;
}
if (_local5 == tahnouci) {
_local7 = _local5.strana;
if ((_local5.posY == 1) && (this[("u" + _local7) + "_1"])) {
utek1.rozsvit(1);
} else {
utek1.rozsvit(0);
}
if ((_local5.posX == DILKUX) && (this[("u" + _local7) + "_2"])) {
utek2.rozsvit(1);
} else {
utek2.rozsvit(0);
}
if ((_local5.posY == DILKUY) && (this[("u" + _local7) + "_3"])) {
utek3.rozsvit(1);
} else {
utek3.rozsvit(0);
}
if ((_local5.posX == 1) && (this[("u" + _local7) + "_4"])) {
utek4.rozsvit(1);
} else {
utek4.rozsvit(0);
}
}
if (_local5 == tahnouci) {
ukazDleKurzoru();
}
return(_local6);
}
function vysvetli(kam) {
if (!kam) {
popisky._visible = false;
} else {
popisky._visible = true;
popisky.gotoAndStop(kam);
}
}
function ukazDleKurzoru() {
var _local5;
var _local9;
var _local7;
var _local4;
var _local6 = "";
_root.popisPostav._visible = false;
if (!pokracovat) {
return(0);
}
if ((!this["HRAC" + naTahu]) && (!casNaUstup)) {
return(0);
}
if (this["HRAC" + naTahu] && (casNaUstup)) {
return(0);
}
_local5 = 1;
while (_local5 < 5) {
if (this["utek" + _local5].sviti && (this["utek" + _local5].hitTest(_root._xmouse, _root._ymouse))) {
vysvetli("flee");
}
_local5++;
}
_local5 = poziceX(this._xmouse, this._ymouse);
_local9 = poziceY(this._xmouse, this._ymouse);
if (!naPlanu(_local5, _local9)) {
return(0);
}
nadX = _local5;
nadY = _local9;
_local4 = figurkaNa(_local5, _local9);
if (_local4) {
_root.popisPostav._visible = true;
_root.popisPostav._x = _root._xmouse;
_root.popisPostav._y = _root._ymouse;
_root.popisPostav.nazev = _root.typyPotvor[_local4.typ].jmeno;
var _local8 = _local4.rychlost();
var _local3 = 1;
while (_local3 <= 6) {
if (_local3 <= _local8) {
_root.popisPostav["stopa" + _local3]._visible = true;
if ((_local4.uzTahnul || ((_local4 == tahnouci) && (_local4.kroku < _local3))) || (_local4.strana != tahnouci.strana)) {
_root.popisPostav["stopa" + _local3]._alpha = 40;
} else {
_root.popisPostav["stopa" + _local3]._alpha = 100;
}
} else {
_root.popisPostav["stopa" + _local3]._visible = false;
}
_local3++;
}
} else {
_root.popisPostav._visible = false;
}
if ((tah < 2) && (tahnouci.kroku == tahnouci.rychlost())) {
_local6 = "begin";
}
_local7 = dlazba[(("d" + nadX) + "_") + nadY];
if (_local7.sviti == 6) {
_local6 = "burn";
popisky.k = tahnouci.muzeSpalit();
} else if (_local7.sviti == 5) {
_local6 = "inflame";
popisky.k = tahnouci.muzeInflamovat();
} else if (_local7.sviti == 1) {
_local6 = "step";
} else if (_local7.sviti == 2) {
popisky.sila = cisloNaporu(tahnouci, _local4);
_local6 = "strike";
} else if (_local7.sviti == 3) {
_local6 = "readyToMove";
} else if (_local7.sviti == 4) {
_local6 = "shoot";
popisky.k = tahnouci.muzeStrilet();
} else if ((((_local4 && (_local4.strana == naTahu)) && (_local4.zivotu)) && (!_local4.uzTahnul)) && ((_local4 != tahnouci) || (neniZvolenaFigurka))) {
if ((!neniZvolenaFigurka) && (tahnouci.kroku < tahnouci.rychlost())) {
_local6 = "moveBreak";
} else {
_local6 = "move";
}
}
if (casNaUstup > 0) {
_local6 = "retreat";
}
vysvetli(_local6);
if (_local7.sviti || (_local4.strana == naTahu)) {
_root.popisPostav.gotoAndStop(_local6);
} else {
_root.popisPostav.gotoAndStop(1);
}
}
function klikNaDesku() {
var _local3;
var _local5;
var _local6;
var _local4;
if (!pokracovat) {
return(0);
}
if ((!this["HRAC" + naTahu]) && (!casNaUstup)) {
return(0);
}
if (this["HRAC" + naTahu] && (casNaUstup)) {
return(0);
}
_local3 = 1;
while (_local3 < 5) {
if (this["utek" + _local3].sviti && (this["utek" + _local3].hitTest(_root._xmouse, _root._ymouse))) {
cinnost.x = this["utek" + _local3].smerX;
cinnost.y = this["utek" + _local3].smerY;
proved(tahnouci, cinnost.x, cinnost.y, 1);
break;
}
_local3++;
}
_local3 = poziceX(this._xmouse, this._ymouse);
_local5 = poziceY(this._xmouse, this._ymouse);
if (!naPlanu(_local3, _local5)) {
return(0);
}
_local6 = figurkaNa(_local3, _local5);
_local4 = dlazba[(("d" + _local3) + "_") + _local5].sviti;
if (_local4 != 5) {
if (((this["HRAC" + naTahu] && (_local6.strana == naTahu)) && (!_local6.uzTahnul)) && ((_local6 != tahnouci) || (neniZvolenaFigurka))) {
zmenTahnouciho(_local6);
neniZvolenaFigurka = false;
ukazMoznosti();
pokracuj();
return(1);
}
}
if (_local4) {
if (_local4 == 3) {
return(0);
}
if (_local4 == 1) {
cinnost.x = _local3 - tahnouci.posX;
cinnost.y = _local5 - tahnouci.posY;
proved(tahnouci, cinnost.x, cinnost.y, 1);
} else if (_local4 == 2) {
utokNeboNapor.moznostX = _local3 - tahnouci.posX;
utokNeboNapor.moznostY = _local5 - tahnouci.posY;
utokNeboNapor.gotoAndPlay(2);
} else if (_local4 == 4) {
cinnost.x = _local3 - tahnouci.posX;
cinnost.y = _local5 - tahnouci.posY;
proved(tahnouci, cinnost.x, cinnost.y, 4);
} else if (_local4 == 5) {
cinnost.x = _local3 - tahnouci.posX;
cinnost.y = _local5 - tahnouci.posY;
proved(tahnouci, cinnost.x, cinnost.y, 5);
} else if (_local4 == 6) {
cinnost.x = _local3 - tahnouci.posX;
cinnost.y = _local5 - tahnouci.posY;
proved(tahnouci, cinnost.x, cinnost.y, 6);
}
stuj();
if (!casNaUstup) {
tahnouci.kroku--;
}
} else {
tahnouci.stavy.zvyrazni(0);
neniZvolenaFigurka = true;
ukazMoznosti(-1);
}
}
function zmenTah() {
var _local3;
var _local4;
posledniStiskX = 0;
posledniStiskY = 0;
pauzaMeziFigurkama = 16;
neniZvolenaFigurka = false;
if (tah && (this[("POSILA" + naTahu) + "CAS"] == tah)) {
nasackuj(naTahu, this[("POSILA" + naTahu) + "X"], this[("POSILA" + naTahu) + "Y"], true);
rozvrstvi(1);
pauzaMeziFigurkama = pauzaMeziFigurkama + 10;
_root.zvuky.signal1.start();
}
if ((!naTahu) || (naTahu == 2)) {
tah++;
naTahu = 1;
neNaTahu = 2;
_local3 = 1;
while (_local3 <= _root.postavy.length) {
this["h" + _local3].uzTahnul = false;
this["h" + _local3].bylNapor = 0;
this["h" + _local3].kroku = this["h" + _local3].rychlost();
if (this["h" + _local3].zivotu) {
trace(((((((((("***** x" + _local3) + ": ") + this["h" + _local3].posX) + " y") + _local3) + ": ") + this["h" + _local3].posY) + " utekl: ") + this["h" + _local3].utekl) + " *******");
}
_local3++;
}
if (!HRAC1) {
ukazMenu(false);
kdoTahne = 1;
zmenTahnouciho(this["h" + kdoTahne]);
} else {
ukazMenu(true);
_local4 = prvniZivej(1, true);
zmenTahnouciho(_local4);
ukazMoznosti();
}
gotoAndStop ("hrac");
} else if (naTahu == 1) {
naTahu = 2;
neNaTahu = 1;
_local3 = 1;
while (_local3 <= _root.potvory.length) {
this["p" + _local3].uzTahnul = false;
this["p" + _local3].bylNapor = 0;
this["p" + _local3].kroku = this["p" + _local3].rychlost();
_local3++;
}
if (!HRAC2) {
_local4 = prvniZivej(2, true);
zmenTahnouciho(_local4);
ukazMenu(false);
} else {
ukazMenu(true);
_local4 = prvniZivej(2, true);
zmenTahnouciho(_local4);
ukazMoznosti();
}
gotoAndStop ("pocitac");
}
obnovVsem(naTahu, 1);
if (tah == 1) {
tahnouci.kroku = Math.min(_root.typyPotvor[tahnouci.typ].rychlost, tahnouci.zivotu);
} else {
tahnouci.kroku = tahnouci.rychlost();
}
}
function zmenTahnouciho(kdo) {
if (tahnouci && (tahnouci.kroku < tahnouci.rychlost())) {
tahnouci.nastavUzTahnul(true);
}
tahnouci.kroku = 0;
tahnouci = kdo;
kdoTahne = kdo.cislo;
if (!kdo.uzTahnul) {
kdo.kroku = kdo.rychlost();
}
}
function dalsiKrok() {
vysledekBoje = jeKonec();
if (vysledekBoje) {
if ((_root.HRAC1 == 0) && (_root.HRAC2 == 1)) {
vysledekBoje = vysledekBoje * -1;
}
_parent.play();
_root.vysledekBoje = vysledekBoje;
var _local6;
var _local5;
if (vysledekBoje < 0) {
_local6 = 2;
_local5 = 1;
} else {
_local6 = 1;
_local5 = 2;
}
urciZraneni(_local6);
_parent.vyprazdniSkupinu(_local5);
return(0);
}
if (pauzaMeziFigurkama > 0) {
pauzaMeziFigurkama--;
if (!casNaUstup) {
return(0);
}
}
if (!pokracovat) {
return(0);
}
if (!tahnouci.hrac) {
if (tahnouci.kroku != byloKroku) {
byloKroku = tahnouci.kroku;
cekejNaZacykleni = 20;
} else {
cekejNaZacykleni--;
if (cekejNaZacykleni < 1) {
byloKroku = 200;
cekejNaZacykleni = 20;
tahnouci.nastavUzTahnul(true);
tahnouci.kroku = 0;
zmenTah();
}
}
}
napor = 0;
if (((naTahu == 2) && (!casNaUstup)) || ((naTahu == 1) && (casNaUstup))) {
bytosti = _root.potvory;
k = "p";
kk = "h";
neNaTahu = 1;
} else {
bytosti = _root.postavy;
k = "h";
kk = "p";
neNaTahu = 2;
}
if (!casNaUstup) {
if (tahnouci.neni()) {
dalsiFigurka(naTahu);
}
}
if (casNaUstup > 0) {
casNaUstup--;
if (casNaUstup < 1) {
tahnouci = tahnouci0;
kdoTahne = tahnouci0.cislo;
hledejCestu(tahnouci.posX, tahnouci.posY, tahnouci.posX, tahnouci.posY);
return(0);
}
}
if ((!casNaUstup) && (tahnouci.neni())) {
tahnouci.nastavUzTahnul(true);
tahnouci.kroku = 0;
dalsiFigurka(naTahu);
}
if ((!casNaUstup) && (tahnouci.kroku < 1)) {
tahnouci.uzTahnul = true;
tahnouci.bylNapor = 0;
if (!dalsiFigurka(naTahu)) {
if (this["HRAC" + naTahu] && (esteNetahli(naTahu))) {
neniZvolenaFigurka = true;
} else {
zmenTah();
}
ukazMoznosti();
return(0);
}
tahnouci = this[k + kdoTahne];
if (tahnouci.zivotu) {
tahnouci.kroku = tahnouci.rychlost();
ukazMoznosti();
} else {
tahnouci.kroku = 0;
return(0);
}
}
if (!tahnouci.hrac) {
vysvetli(0);
if (((tahnouci.kroku == tahnouci.rychlost()) || (!tahnouci.souper)) || (tahnouci.souper.neni())) {
hledejCestu(tahnouci.posX, tahnouci.posY, tahnouci.posX, tahnouci.posY);
if (!casNaUstup) {
tahnouci.souper = urciSoupere(tahnouci);
}
trace("Souper je " + tahnouci.souper.cislo);
trace((((((("Hledam cestu " + tahnouci.souper.posX) + " ") + tahnouci.souper.posY) + " do ") + tahnouci.posX) + " ") + tahnouci.posY);
}
dalkaKsouperi = hledejCestu(tahnouci.souper.posX, tahnouci.souper.posY, tahnouci.posX, tahnouci.posY);
if (dalkaKsouperi == -2) {
dalkaKsouperi = dalkaVzduchem(tahnouci.posX, tahnouci.posY, tahnouci.souper.posX, tahnouci.souper.posY);
}
urciKrok();
if (cinnost.typ == 4) {
tahnouci.kroku--;
stuj();
proved(tahnouci, cinnost.x, cinnost.y, 4);
} else if (cinnost.typ == 5) {
tahnouci.kroku--;
stuj();
proved(tahnouci, cinnost.x, cinnost.y, 5);
} else if (cinnost.typ == 6) {
tahnouci.kroku--;
stuj();
proved(tahnouci, cinnost.x, cinnost.y, 6);
} else if (cinnost.typ) {
trace((("posun x:" + cinnost.x) + " posun y:") + cinnost.y);
if (!casNaUstup) {
tahnouci.kroku--;
}
stuj();
proved(tahnouci, cinnost.x, cinnost.y, cinnost.typ);
} else if (casNaUstup < 1) {
tahnouci.stavy.zvyrazni(0);
if (!dalsiFigurka(naTahu)) {
zmenTah();
return(0);
}
} else {
casNaUstup = 0;
tahnouci = tahnouci.souper;
kdoTahne = tahnouci.cislo;
ukazMoznosti();
}
} else {
stisknutoX = 0;
stisknutoY = 0;
if (Key.isDown(32) && (_root.testovaniBitvy)) {
_root.zvuky.signal1.start();
var _local4 = 1;
while (_local4 <= _root.potvory.length) {
this["p" + _local4]._visible = false;
this["p" + _local4].zivotu = 0;
_local4++;
}
return(0);
}
if (Key.isDown(27)) {
tahnouci.kroku = 0;
return(0);
}
if (Key.isDown(37)) {
stisknutoX = -1;
stisknutoY = -1;
}
if (Key.isDown(39)) {
stisknutoX = 1;
stisknutoY = 1;
}
if (Key.isDown(38)) {
stisknutoX = 1;
stisknutoY = -1;
}
if (Key.isDown(40)) {
stisknutoX = -1;
stisknutoY = 1;
}
if (!lzeJit(tahnouci, stisknutoX, stisknutoY)) {
stisknutoX = 0;
stisknutoY = 0;
}
posledniStiskX = stisknutoX;
posledniStiskY = stisknutoY;
cinnost.x = stisknutoX;
cinnost.y = stisknutoY;
if (cinnost.x || (cinnost.y)) {
if (!casNaUstup) {
tahnouci.kroku--;
} else {
tahnouci.ustupuje = true;
}
stuj();
proved(tahnouci, cinnost.x, cinnost.y);
}
}
}
function dalsiFigurka(strana) {
casNaUstup = 0;
var _local3;
var _local4;
if (strana == 1) {
_local3 = "h";
_local4 = _root.postavy;
} else {
_local3 = "p";
_local4 = _root.potvory;
}
var _local5 = kdoTahne;
this[_local3 + kdoTahne].stavy.zvyrazni(0);
if (this["HRAC" + strana]) {
neniZvolenaFigurka = true;
return(0);
}
do {
kdoTahne--;
if (kdoTahne < 1) {
kdoTahne = _local4.length;
}
if (kdoTahne == _local5) {
return(0);
}
} while (this[_local3 + kdoTahne].uzTahnul || (this[_local3 + kdoTahne].neni()));
tahnouci = this[_local3 + kdoTahne];
return(_local3);
}
function urciKrok() {
if (!tahnouci.souper) {
cinnost.x = 0;
cinnost.y = 0;
cinnost.typ = 0;
return(0);
}
var _local4;
var _local5;
var _local2 = (vyhoda(tahnouci.souper) + random(8)) - random(5);
_local2 = _local2 + Math.round((pocetBojujicich(tahnouci.strana) - 1) / 1);
_local2 = _local2 + _root.typyPotvor[tahnouci.typ].agrese;
_local2 = _local2 + tahnouci.moralka;
if (!_local2) {
_local2 = 0;
}
if (_local2 >= 0) {
zmenaDalky(tahnouci.posX, tahnouci.posY, -1);
}
if (_local2 < -3) {
napor = -1;
}
if (_local2 < 0) {
zmenaDalky(tahnouci.posX, tahnouci.posY, 1);
}
trace("vyhoda " + _local2);
if (((tahnouci.muzeSpalit() > 0) && (napor > -1)) && (dalkaVzduchem(tahnouci.posX, tahnouci.posY, tahnouci.souper.posX, tahnouci.souper.posY) <= 3)) {
cinnost.x = tahnouci.souper.posX - tahnouci.posX;
cinnost.y = tahnouci.souper.posY - tahnouci.posY;
cinnost.typ = 6;
return(6);
}
if (((tahnouci.muzeStrilet() > 0) && (napor > -1)) && (caraStrely(tahnouci, tahnouci.souper.posX, tahnouci.souper.posY))) {
cinnost.x = tahnouci.souper.posX - tahnouci.posX;
cinnost.y = tahnouci.souper.posY - tahnouci.posY;
cinnost.typ = 4;
return(4);
}
var _local3 = nejlepsiKamarad(tahnouci);
if (((tahnouci.muzeInflamovat() > 0) && (napor > -1)) && (_local3)) {
cinnost.x = _local3.posX - tahnouci.posX;
cinnost.y = _local3.posY - tahnouci.posY;
cinnost.typ = 5;
return(5);
}
if (((((tahnouci.posX + cinnost.x) == tahnouci.souper.posX) && ((tahnouci.posY + cinnost.y) == tahnouci.souper.posY)) && (tahnouci.streh >= Math.floor(tahnouci.maxStav(1) / 2))) && (_local2 > 4)) {
cinnost.typ = 3;
} else if (!lzeJit(tahnouci, cinnost.x, cinnost.y)) {
cinnost.x = 0;
cinnost.y = 0;
cinnost.typ = 0;
tahnouci.kroku--;
return(0);
}
if (!cinnost.x) {
cinnost.x = 0;
}
if (!cinnost.y) {
cinnost.y = 0;
}
return(1);
}
function vyhoda(keKomu) {
var _local2;
var _local1;
var _local7;
var _local3;
_local2 = 0;
_local1 = 0;
var _local4 = 0;
var _local5 = Math.floor(tahnouci.maxStav(1) / 2);
if (tahnouci.streh >= _local5) {
_local4 = Math.min(_local5, keKomu.streh);
}
trace("dalkaKsouperi " + dalkaKsouperi);
if (tahnouci.strana == naTahu) {
_local3 = tahnouci.kroku + 1;
} else {
_local3 = 1;
}
if (_local3 >= dalkaKsouperi) {
_local2 = (((5 + _local3) + _local4) - keKomu.streh) + (tahnouci.zivotu / 4);
_local1 = ((5 + _local4) - tahnouci.streh) + (keKomu.zivotu / 4);
if (_local2 < 0) {
_local2 = 0;
}
if (_local1 < 0) {
_local1 = 0;
}
}
trace((((("Souper: " + keKomu) + " plus: ") + _local2) + " minus: ") + _local1);
if (dalkaKsouperi < 3) {
_local1 = _local1 + 3;
}
return(_local2 - _local1);
}
function proved(kdo, coX, coY, jak) {
var _local6;
var _local8;
var _local3;
if (jak == 10) {
pokracuj();
return(0);
}
ukazMoznosti(-1);
if (jak == 4) {
kdo.bylNapor = 0;
cilX = kdo.posX + coX;
cilY = kdo.posY + coY;
_local3 = figurkaNa(cilX, cilY);
_local3.souper = kdo;
kdo.souper = _local3;
zranObrance(_local3);
kdo.strelba();
natocSeSpravne(kdo);
_local3.kryt();
kdo.kroku = kdo.kroku - (_root.typyPotvor[kdo.typ].shoot - 1);
return(4);
}
if (jak == 5) {
kdo.bylNapor = 0;
cilX = kdo.posX + coX;
cilY = kdo.posY + coY;
_local3 = figurkaNa(cilX, cilY);
kdo.inflamuj(_local3);
kdo.kroku = kdo.kroku - (_root.typyPotvor[kdo.typ].inflame - 1);
return(5);
}
if (jak == 6) {
kdo.bylNapor = 0;
cilX = kdo.posX + coX;
cilY = kdo.posY + coY;
_local3 = figurkaNa(cilX, cilY);
_local3.souper = kdo;
kdo.souper = _local3;
zranObrance(_local3);
kdo.spal(_local3);
natocSeSpravne(kdo);
kdo.kroku = kdo.kroku - (_root.typyPotvor[kdo.typ].burn - 1);
return(6);
}
if (jak == 3) {
napor = 1;
kdo.bylNapor = 1;
} else {
napor = 0;
kdo.bylNapor = 0;
}
cilX = kdo.posX + coX;
cilY = kdo.posY + coY;
_local3 = figurkaNa(cilX, cilY);
if (_local3 && (_local3.strana == neNaTahu)) {
_local3.bylNapor = 0;
_local3.souper = kdo;
kdo.souper = _local3;
if (napor > 0) {
_local6 = cisloNaporu(kdo, _local3);
kdo.streh = kdo.streh - _local6;
_local3.streh = _local3.streh - _local6;
kdo.stavy.streh.h1.textik.text = tahnouci.streh;
_local3.stavy.streh.h1.textik.text = _local3.streh;
}
zranObrance(_local3);
if (rozhozeniUtocnika > kdo.streh) {
zraneniUtocnika = rozhozeniUtocnika - kdo.streh;
kdo.streh = 0;
kdo.zivotu = kdo.zivotu - zraneniUtocnika;
if (kdo.zivotu <= 0) {
kdo.zivotu = 0;
}
} else {
zraneniUtocnika = 0;
kdo.streh = kdo.streh - rozhozeniUtocnika;
}
if ((napor > 0) && (_local6)) {
kdo.napor();
} else {
kdo.utok();
}
natocSeSpravne(kdo);
natocSeSpravne(_local3);
_local3.obrana();
} else {
kdo.posun(coX, coY);
}
if (kdo.hrac) {
}
if (casNaUstup) {
casNaUstup = 0;
tahnouci = tahnouci0;
}
}
function zranObrance(s) {
var _local3;
rozhozeniObrance = rozhozeni(s, s.souper);
if (rozhozeniObrance > s.streh) {
zraneniObrance = rozhozeniObrance - s.streh;
_local3 = _root.typyPotvor[s.souper.typ].lethality;
if (_local3) {
zraneniObrance = Math.ceil(zraneniObrance * _local3);
}
s.streh = 0;
} else {
zraneniObrance = 0;
s.streh = s.streh - rozhozeniObrance;
}
if ((s.zivotu - zraneniObrance) > 0) {
rozhozeniUtocnika = rozhozeni(s.souper, s);
s.zivotu = s.zivotu - zraneniObrance;
} else {
s.zivotu = 0;
rozhozeniUtocnika = 0;
}
}
function hledejCestu(x1, y1, x2, y2) {
nalezeno = 0;
while (frontaDalky.length) {
frontaDalky.pop();
}
var _local2 = 0;
while (_local2 < DILKUY) {
var _local1 = 0;
while (_local1 < DILKUX) {
cesty[_local1][_local2] = 10000;
_local1++;
}
_local2++;
}
var _local6 = 0;
if ((x1 == x2) && (y1 == y2)) {
_local6 = 1;
}
var _local3;
cesty[x1 - 1][y1 - 1] = 0;
if ((!_local6) && (jeCerna(x1, y1) != jeCerna(x2, y2))) {
if (naPlanu(x1 - 1, y1)) {
cesty[x1 - 2][y1 - 1] = 1;
frontaDalky.push(x1 - 1);
frontaDalky.push(y1);
}
if (naPlanu(x1, y1 - 1)) {
cesty[x1 - 1][y1 - 2] = 1;
frontaDalky.push(x1);
frontaDalky.push(y1 - 1);
}
if (naPlanu(x1, y1 + 1)) {
cesty[x1 - 1][y1] = 1;
frontaDalky.push(x1);
frontaDalky.push(y1 + 1);
}
if (naPlanu(x1 + 1, y1)) {
cesty[x1][y1 - 1] = 1;
frontaDalky.push(x1 + 1);
frontaDalky.push(y1);
}
} else {
frontaDalky.push(x1);
frontaDalky.push(y1);
}
while (frontaDalky.length) {
var _local1 = frontaDalky.shift();
_local2 = frontaDalky.shift();
if (((policka[_local1 - 1][_local2 - 1] != 0) && ((_local1 != x1) || (_local2 != y1))) && ((_local1 != x2) || (_local2 != y2))) {
continue;
}
_local3 = cesty[_local1 - 1][_local2 - 1];
if (((_local1 == x2) && (_local2 == y2)) && (!_local6)) {
nalezeno = 1;
continue;
}
_local3++;
if (cesty[_local1 - 2][_local2 - 2] > _local3) {
frontaDalky.push(_local1 - 1);
frontaDalky.push(_local2 - 1);
cesty[_local1 - 2][_local2 - 2] = _local3;
}
if (cesty[_local1][_local2 - 2] > _local3) {
frontaDalky.push(_local1 + 1);
frontaDalky.push(_local2 - 1);
cesty[_local1][_local2 - 2] = _local3;
}
if (cesty[_local1 - 2][_local2] > _local3) {
frontaDalky.push(_local1 - 1);
frontaDalky.push(_local2 + 1);
cesty[_local1 - 2][_local2] = _local3;
}
if (cesty[_local1][_local2] > _local3) {
frontaDalky.push(_local1 + 1);
frontaDalky.push(_local2 + 1);
cesty[_local1][_local2] = _local3;
}
if (_local6) {
if (cesty[_local1 - 2][_local2 - 1] > _local3) {
cesty[_local1 - 2][_local2 - 1] = _local3;
}
if (cesty[_local1 - 1][_local2 - 2] > _local3) {
cesty[_local1 - 1][_local2 - 2] = _local3;
}
if (cesty[_local1 - 1][_local2] > _local3) {
cesty[_local1 - 1][_local2] = _local3;
}
if (cesty[_local1][_local2 - 1] > _local3) {
cesty[_local1][_local2 - 1] = _local3;
}
}
}
if (nalezeno) {
return(cesty[x2 - 1][y2 - 1]);
}
return(-2);
}
function nejsvobodnejsi(strana) {
var _local6 = this["armada" + strana];
var _local4 = this["iniciala" + strana];
var _local2;
var _local3;
var _local7;
var _local5 = 0;
_local2 = 1;
while (_local2 <= _local6.length) {
_local3 = ukazMoznosti(this[_local4 + _local2]);
if (_local3 > _local5) {
_local5 = _local3;
_local7 = this[_local4 + _local2];
}
_local2++;
}
return(_local7);
}
function nejlepsiSouper(koho) {
var _local8 = 0;
var _local7 = 10000;
var _local9;
var _local4;
var _local6;
if (koho.strana == 1) {
k = "p";
bytosti = _root.potvory;
_local9 = 2;
} else {
k = "h";
bytosti = _root.postavy;
_local9 = 1;
}
var _local3 = 1;
while (_local3 <= bytosti.length) {
if (this[k + _local3].neni()) {
} else {
_local4 = cesty[this[k + _local3].posX - 1][this[k + _local3].posY - 1];
if ((!_local4) || (_local4 > 1000)) {
_local4 = dalkaVzduchem(koho.posX, koho.posY, this[k + _local3].posX, this[k + _local3].posY) + 2;
}
_local6 = koho.muzeStrilet();
if (((_local6 > 0) && (_local6 <= _local4)) && (caraStrely(koho, this[k + _local3].posX, this[k + _local3].posY))) {
_local4 = _local6 - 1;
}
_local4 = _local4 + (this[k + _local3].streh / 6);
if (this[k + _local3].muzeStrilet()) {
_local4 = _local4 - random(3);
}
if (this[k + _local3].muzeInflamovat()) {
_local4 = _local4 - 1;
}
if (this[k + _local3].muzeSpalit()) {
_local4 = _local4 - 1;
}
if (_root.typyPotvor[this[k + _local3].typ].lethality > 1) {
_local4 = _local4 - 1;
}
if (this["zlodej" + koho.strana] == _local3) {
_local4 = _local4 - 3;
}
if (this["VIP" + _local9] == _local3) {
_local4 = _local4 - 2;
}
_local4 = _local4 + random(2);
_local4 = _local4 - random(2);
if (_local4 < _local7) {
_local8 = _local3;
_local7 = _local4;
}
}
_local3++;
}
trace("Souper je typu " + this[k + _local8].typ);
if (_local8) {
return(this[k + _local8]);
}
return(0);
}
function nejlepsiKamarad(koho) {
if (!koho.muzeInflamovat()) {
return(0);
}
var _local9 = 0;
var _local8 = 0;
var _local7;
var _local6;
var _local4;
if (koho.strana == 2) {
k = "p";
bytosti = _root.potvory;
_local7 = 1;
} else {
k = "h";
bytosti = _root.postavy;
_local7 = 2;
}
var _local3 = 1;
while (_local3 <= bytosti.length) {
if (this[k + _local3].neni()) {
} else {
_local6 = dalkaVzduchem(koho.posX, koho.posY, this[k + _local3].posX, this[k + _local3].posY);
if ((!_local6) || (_local6 > 3)) {
} else {
_local4 = _root.typyPotvor[this[k + _local3].typ].boj - this[k + _local3].streh;
if (_local4 < 0) {
_local4 = 0;
}
if (this["zlodej" + _local7] == _local3) {
_local4 = _local4 + 10;
}
_local4 = _local4 + (pocetKontaktu(this[k + _local3].posX, this[k + _local3].posY, _local7) * 15);
if (this["VIP" + koho.strana] == _local3) {
_local4 = _local4 + 20;
}
_local4 = _local4 + random(10);
_local4 = _local4 - random(10);
if (_local4 > _local8) {
_local9 = _local3;
_local8 = _local4;
}
}
}
_local3++;
}
if (_local9) {
return(this[k + _local9]);
}
return(0);
}
function nejblizsiSouperVzduchem(koho) {
var _local7 = 0;
var _local5 = 10000;
var _local4;
if (koho.strana == 1) {
k = "p";
bytosti = _root.potvory;
} else {
k = "h";
bytosti = _root.postavy;
}
var _local3 = 1;
while (_local3 <= bytosti.length) {
if (this[k + _local3].neni()) {
} else {
_local4 = dalkaVzduchem(koho.posX, koho.posY, this[k + _local3].posX, this[k + _local3].posY);
if (_local4 < _local5) {
_local7 = _local3;
_local5 = _local4;
}
}
_local3++;
}
return(this[k + _local7]);
}
function dalkaVzduchem(x1, y1, x2, y2) {
var _local1;
_local1 = Math.max(Math.abs(x1 - x2), Math.abs(y1 - y2));
return(_local1);
}
function nahodnejSouper(koho) {
if (koho.strana == 1) {
k = "p";
bytosti = _root.potvory;
} else {
k = "h";
bytosti = _root.postavy;
}
var _local5 = random(bytosti.length) + 1;
var _local3 = _local5;
var _local4 = this[k + _local3];
while ((!_local4) || (!_local4.zivotu)) {
_local3++;
if (_local3 > bytosti.length) {
_local3 = 1;
}
if (_local3 == _local5) {
return(0);
}
_local4 = this[k + _local3];
}
return(_local4);
}
function urciSoupere(kdo) {
var _local1;
if (random(4)) {
_local1 = nejlepsiSouper(kdo);
} else {
_local1 = nahodnejSouper(kdo);
}
return(_local1);
}
function sousedi(x1, y1, x2, y2, rovne) {
if (!rovne) {
return((Math.abs(x1 - x2) == 1) && (Math.abs(y1 - y2) == 1));
}
return((Math.abs(x1 - x2) + Math.abs(y1 - y2)) == 1);
}
function zmenaDalky(x, y, smer) {
if (smer < 0) {
trace("Chci bliz.");
} else if (smer > 0) {
trace("Chci dal.");
}
var _local9;
var _local11;
var _local8;
var _local10;
var _local1;
var _local2;
cinnost.x = 0;
cinnost.y = 0;
cinnost.typ = 0;
if (!smer) {
smer = 0;
}
var _local7 = cesty[x - 1][y - 1];
if ((!_local7) || (_local7 > 1000)) {
cinnost.x = (-smer) * (tahnouci.souper.posX - tahnouci.posX);
cinnost.y = (-smer) * (tahnouci.souper.posY - tahnouci.posY);
if (cinnost.x) {
cinnost.x = cinnost.x / Math.abs(cinnost.x);
} else {
cinnost.x = (random(2) * 2) - 1;
}
if (cinnost.y) {
cinnost.y = cinnost.y / Math.abs(cinnost.y);
} else {
cinnost.y = (random(2) * 2) - 1;
}
cinnost.typ = 1;
return(0);
}
if (random(2)) {
_local9 = x - 1;
_local8 = x + 2;
dx = 1;
} else {
_local9 = x + 1;
_local8 = x - 2;
dx = -1;
}
if (random(2)) {
_local11 = y - 1;
_local10 = y + 2;
dy = 1;
} else {
_local11 = y + 1;
_local10 = y - 2;
dy = -1;
}
var _local5;
_local2 = _local11;
while (_local2 != _local10) {
_local1 = _local9;
while (_local1 != _local8) {
trace((((((((((("Dalka (" + x) + ",") + y) + ") ") + cesty[x - 1][y - 1]) + " vs. (") + _local1) + ",") + _local2) + ") ") + cesty[_local1 - 1][_local2 - 1]);
if (!naPlanu(_local1, _local2)) {
_local5 = -1;
} else {
_local5 = cesty[x - 1][y - 1] - cesty[_local1 - 1][_local2 - 1];
}
if (((((_local5 > 0) && (smer < 0)) || ((_local5 < 0) && (smer > 0))) && (Math.abs(_local5) < DILKUX)) && (lzeJit(tahnouci, _local1 - x, _local2 - y))) {
if ((_local7 < 2) || ((_local1 != x) && (_local2 != y))) {
cinnost.x = _local1 - x;
cinnost.y = _local2 - y;
if (x && (y)) {
cinnost.typ = 1;
} else if ((!x) && (!y)) {
cinnost.typ = 0;
} else {
cinnost.typ = 2;
}
trace((((("Pro smer " + smer) + " je x: ") + cinnost.x) + " y: ") + cinnost.y);
return(1);
}
}
_local1 = _local1 + dx;
}
_local2 = _local2 + dy;
}
return(0);
}
function caraStrely(kdo, x2, y2) {
if (kdo == naKoho) {
return(0);
}
if ((Math.abs(kdo.posX - x2) <= 1) && (Math.abs(kdo.posY - y2) <= 1)) {
return(0);
}
var _local17 = _root.typyPotvor[kdo.typ].velikost;
var _local16 = _root.typyPotvor[figurkaNa(x2, y2).typ].velikost;
if (!_local16) {
_local16 = 0;
}
var _local12;
var _local11;
var _local2;
var _local4;
var _local14;
var _local20;
var _local8;
var _local6;
var _local19;
var _local18;
var _local7;
var _local5;
var _local3;
_local12 = x2 - kdo.posX;
_local11 = y2 - kdo.posY;
if (_local12) {
_local19 = _local12 / Math.abs(_local12);
} else {
_local19 = 0;
}
if (_local11) {
_local18 = _local11 / Math.abs(_local11);
} else {
_local18 = 0;
}
_local12 = Math.abs(_local12);
_local11 = Math.abs(_local11);
if (_local12 > _local11) {
_local14 = _local12;
_local20 = _local11;
_local8 = kdo.posX;
_local6 = kdo.posY;
_local7 = _local19;
_local5 = _local18;
} else {
_local20 = _local12;
_local14 = _local11;
_local6 = kdo.posX;
_local8 = kdo.posY;
_local5 = _local19;
_local7 = _local18;
}
var _local10;
var _local9 = 0;
var _local13 = _local20 / _local14;
trace(("Cara strely s pomerem " + _local13) + ":");
_local2 = 1;
while (_local2 < _local14) {
if (_local13) {
_local9 = _local9 + _local13;
}
if ((_local9 - Math.floor(_local9)) == 0.5) {
} else {
_local4 = Math.round(_local9);
if (_local12 > _local11) {
_local3 = figurkaNa(_local8 + (_local7 * _local2), _local6 + (_local5 * _local4));
trace(((((_local8 + (_local7 * _local2)) + " ") + (_local6 + (_local5 * _local4))) + " ") + _local3);
} else {
_local3 = figurkaNa(_local6 + (_local5 * _local4), _local8 + (_local7 * _local2));
trace(((((_local6 + (_local5 * _local4)) + " ") + (_local8 + (_local7 * _local2))) + " ") + _local3);
}
_local10 = _root.typyPotvor[_local3.typ].velikost;
if (_local3 && ((_local10 >= _local17) || (_local10 >= _local16))) {
return(0);
}
}
_local2++;
}
return(_local14);
}
function pocetKontaktu(x, y, b) {
var _local1 = 0;
if (barvaPole(x - 1, y) == b) {
_local1++;
}
if (barvaPole(x + 1, y) == b) {
_local1++;
}
if (barvaPole(x, y - 1) == b) {
_local1++;
}
if (barvaPole(x, y + 1) == b) {
_local1++;
}
return(_local1);
}
function figurkaNa(x, y) {
return(policka[x - 1][y - 1]);
}
function prvniZivej(strana, obracene) {
var _local4 = 0;
var _local8 = this["armada" + strana];
var _local3 = this["iniciala" + strana];
var _local6;
var _local7;
var _local5;
if (!obracene) {
_local6 = 1;
_local7 = _local8.length + 1;
_local5 = 1;
} else {
_local6 = _local8.length;
_local7 = 0;
_local5 = -1;
}
var _local2 = _local6;
while (_local2 != _local7) {
if (!this[_local3 + _local2].neni()) {
if (this[_local3 + _local2].hrac) {
return(this[_local3 + _local2]);
}
if (!_local4) {
_local4 = this[_local3 + _local2];
}
}
_local2 = _local2 + _local5;
}
return(_local4);
}
function pocetBojujicich(strana) {
var _local4 = 0;
if (strana == 2) {
var _local3 = 1;
while (_local3 <= _root.potvory.length) {
if (!this["p" + _local3].neni()) {
_local4++;
}
_local3++;
}
} else {
var _local3 = 1;
while (_local3 <= _root.postavy.length) {
if (!this["h" + _local3].neni()) {
_local4++;
}
_local3++;
}
}
return(_local4);
}
function pocetPrezivsich(strana) {
var _local4 = 0;
if (strana == 2) {
var _local3 = 1;
while (_local3 <= _root.potvory.length) {
if (this["p" + _local3].zivotu) {
_local4++;
}
_local3++;
}
} else {
var _local3 = 1;
while (_local3 <= _root.postavy.length) {
if (this["h" + _local3].zivotu) {
_local4++;
}
_local3++;
}
}
return(_local4);
}
function rozhozeni(koho, odKoho) {
var _local2 = random(10) + 1;
if (((_local2 == 10) && (odKoho)) && (_root.typyPotvor[odKoho.typ].critical)) {
_local2 = _local2 + random(10);
}
return(_local2);
}
function cisloNaporu(kdo, naKoho) {
var _local2 = Math.floor(kdo.maxStav(1) / 2);
if (kdo.streh < _local2) {
return(0);
}
var _local1;
_local1 = _local2;
if (_local1 > naKoho.streh) {
_local1 = naKoho.streh;
}
return(_local1);
}
function jeUstup() {
return(0);
}
function naPlanu(x, y) {
if ((x < 1) || (x > DILKUX)) {
return(0);
}
if ((y < 1) || (y > DILKUY)) {
return(0);
}
return(1);
}
function povolenoPoleUteku(kdo, x, y) {
var _local2 = kdo.strana;
if ((x < 1) && (this[(("u" + _local2) + "_") + 4])) {
return(1);
}
if ((x > DILKUX) && (this[(("u" + _local2) + "_") + 2])) {
return(1);
}
if ((y < 1) && (this[(("u" + _local2) + "_") + 1])) {
return(1);
}
if ((y > DILKUY) && (this[(("u" + _local2) + "_") + 3])) {
return(1);
}
}
function lzeJit(kdo, kamX, kamY) {
var _local2 = barvaPole(kdo.posX + kamX, kdo.posY + kamY);
if ((!naPlanu(kdo.posX + kamX, kdo.posY + kamY)) && ((napor > -1) || (!povolenoPoleUteku(kdo, kdo.posX + kamX, kdo.posY + kamY)))) {
return(0);
}
if (tahnouci.strana != naTahu) {
if (_local2) {
return(0);
}
}
if ((_local2 && (_local2 == kdo.strana)) && (kamX || (kamY))) {
return(0);
}
if ((kdo.bylNapor && (!kdo.souper.neni())) && (dalkaVzduchem(kdo.posX + kamX, kdo.posY + kamY, kdo.souper.posX, kdo.souper.posY) > 1)) {
return(0);
}
return(1);
}
function lzeKontaktovat(kdo, x2, y2) {
if (!kdo.kroku) {
return(0);
}
if ((Math.abs(kdo.posX - x2) > 1) || (Math.abs(kdo.posY - y2) > 1)) {
return(0);
}
var _local5 = 0;
if (!naPlanu(kamX, kamY)) {
return(0);
}
var _local2 = barvaPole(x2, y2);
if (tahnouci.strana != naTahu) {
if (_local2) {
return(0);
}
}
if (_local2) {
_local5++;
}
if ((x2 == kdo.posX) && (y2 == kdo.posY)) {
return(3);
}
if (kdo.strana == _local2) {
return(0);
}
if (((x2 == kdo.posX) || (y2 == kdo.posY)) && ((!_local2) || (kdo.strana == _local2))) {
return(0);
}
if ((kdo.bylNapor && (!kdo.souper.neni())) && (dalkaVzduchem(x2, y2, kdo.souper.posX, kdo.souper.posY) > 1)) {
return(0);
}
return(_local5 + 1);
}
function lzeAkcnit(kdo, x2, y2) {
var _local2 = barvaPole(x2, y2);
if ((((kdo.muzeStrilet() > 0) && (_local2)) && (kdo.strana != _local2)) && (caraStrely(kdo, x2, y2))) {
return(4);
}
if ((((kdo.muzeInflamovat() > 0) && (_local2)) && (kdo.strana == _local2)) && (dalkaVzduchem(kdo.posX, kdo.posY, x2, y2) <= 3)) {
return(5);
}
if ((((kdo.muzeSpalit() > 0) && (_local2)) && (kdo.strana != _local2)) && (dalkaVzduchem(kdo.posX, kdo.posY, x2, y2) <= 3)) {
return(6);
}
return(0);
}
function natocSe(kdo, sX, sY) {
var _local3 = _root.typyPotvor[kdo.typ].postava;
if (sY < 0) {
kdo.p.gotoAndStop(_local3 * 2);
} else {
kdo.p.gotoAndStop((_local3 * 2) - 1);
}
if ((-1 * sX) == sY) {
kdo.p.p._xscale = 1 * Math.abs(kdo.p.p._xscale);
} else {
kdo.p.p._xscale = -1 * Math.abs(kdo.p.p._xscale);
}
}
function natocSeSpravne(kdo, x2, y2) {
var _local1;
var _local3;
var _local2;
if (x2) {
_local1 = 1;
} else {
_local1 = kdo.souper;
}
if (!_local1) {
_local1 = nejblizsiSouper(kdo);
}
if (!_local1) {
trace("Nelze nalezt nejblizsiho nepritele");
}
if (!x2) {
_local3 = _local1.posX - kdo.posX;
_local2 = _local1.posY - kdo.posY;
} else {
_local3 = x2 - kdo.posX;
_local2 = y2 - kdo.posY;
}
if (!_local3) {
_local3 = 1;
} else {
_local3 = _local3 / Math.abs(_local3);
}
if (!_local2) {
_local2 = 1;
} else {
_local2 = _local2 / Math.abs(_local2);
}
if (_local1) {
natocSe(kdo, _local3, _local2);
}
}
function nasackuj(kdo, smerX, smerY, posila) {
var _local14 = this["armada" + kdo];
var _local15 = this["iniciala" + kdo];
var _local2;
var _local21;
var _local7;
var _local6 = 1;
var _local13 = Math.ceil(DILKUX / 2);
var _local12 = Math.ceil(DILKUY / 2);
var _local11;
var _local10;
var _local4;
var _local3;
var _local9;
var _local8;
var _local5 = 0;
if (smerX > 1) {
smerX = 0;
smerY = 1;
_local21 = 4;
} else if ((!smerX) && (!smerY)) {
_local21 = 3;
} else if (smerX && (smerY)) {
_local21 = 2;
} else {
_local21 = 1;
}
if (_local21 < 4) {
_local7 = lihnuti[_local21];
} else {
_local7 = lihnuti[1];
}
_local11 = _local13 + (smerX * (_local13 - 1));
_local10 = _local12 + (smerY * (_local12 - 1));
if (kdo == 2) {
if (smerY) {
_local11--;
if (!naPlanu(_local11, _local10)) {
_local11 = _local11 + 2;
}
} else {
_local10--;
if (!naPlanu(_local11, _local10)) {
_local10 = _local10 + 2;
}
}
}
_local2 = this[_local15 + _local6];
if (!posila) {
obsad(_local2, _local11, _local10);
_local2._x = pixelX(_local11, _local10);
_local2._y = pixelY(_local11, _local10);
trace((((((("Nasadil jsem hrace " + kdo) + " figurka ") + _local6) + " na ") + _local11) + " ") + _local10);
}
_local6++;
var _local19;
if ((!smerY) && (smerX)) {
_local19 = true;
} else {
_local19 = false;
}
if (!smerX) {
smerX = 1;
}
if (!smerY) {
smerY = -1;
}
while ((_local6 <= _local14.length) && (_local5 < _local7.length)) {
_local2 = this[_local15 + _local6];
if ((_local2.mimo && (!posila)) || ((!_local2.mimo) && (posila))) {
_local6++;
continue;
}
if (_local19) {
_local9 = _local5 + 1;
_local8 = _local5;
} else {
_local9 = _local5;
_local8 = _local5 + 1;
}
_local4 = _local11 - (smerX * _local7[_local9]);
_local3 = _local10 - (smerY * _local7[_local8]);
trace((("Zkousim nasadit na " + _local4) + " ") + _local3);
if (naPlanu(_local4, _local3) && (!figurkaNa(_local4, _local3))) {
_local2._visible = true;
_local2.mimo = false;
obsad(_local2, _local4, _local3);
_local2._x = pixelX(_local4, _local3);
_local2._y = pixelY(_local4, _local3);
_local6++;
}
_local5 = _local5 + 2;
}
if (_local21 == 4) {
var _local20 = Math.ceil(_local14.length / 2);
_local5 = _local14.length;
while (_local5 > _local20) {
_local2 = this[_local15 + _local5];
_local4 = _local13 + (_local13 - _local2.posX);
_local3 = _local12 + (_local12 - _local2.posY);
if (naPlanu(_local4, _local3) && (barvaPole(_local4, _local3) != _local2.strana)) {
presun(_local2, _local4, _local3);
_local2._x = pixelX(_local4, _local3);
_local2._y = pixelY(_local4, _local3);
}
_local5--;
}
}
return(_local6 - 1);
}
function stvorPoklady() {
var _local5;
var _local4;
var _local2;
var _local3;
_local2 = 1;
while (_local2 <= 2) {
if (this["POKLAD" + _local2]) {
_local3 = this.attachMovie("poklad", "poklad" + _local2, this.getNextHighestDepth());
_local3.gotoAndStop(this["POKLAD" + _local2]);
_local3._x = pixelX(this[("POKLAD" + _local2) + "X"], this[("POKLAD" + _local2) + "Y"]);
_local3._y = pixelY(this[("POKLAD" + _local2) + "X"], this[("POKLAD" + _local2) + "Y"]);
}
_local2++;
}
}
function stvorPostavy() {
var _local3;
var _local8;
var _local7 = _root.postavy.length;
var _local4 = 0;
while (_local4 < _local7) {
_local3 = this.attachMovie("figurka", "h" + (_local4 + 1), this.getNextHighestDepth(), {_xscale:94, _yscale:94});
_local3.typ = _root.postavy[_local4];
_local3.strana = 1;
_local3.streh = 1;
_local3.zivotu = 1;
_local3.stavy.zivotup.gotoAndStop(21);
_local3.cislo = _local4 + 1;
_local3.hrac = HRAC1;
_local3.moralka = MORALKA1;
_local3.p.podst.gotoAndStop(_local3.strana);
if (_local3.typ < 0) {
_local3.mimo = true;
_local3.typ = -_local3.typ;
_local3._visible = false;
}
_local4++;
}
}
function stvorPotvory() {
var _local3;
var _local9;
var _local8 = _root.potvory.length;
var _local4 = 0;
while (_local4 < _local8) {
_local3 = this.attachMovie("figurka", "p" + (_local4 + 1), this.getNextHighestDepth(), {smerPohledu:1, _xscale:94, _yscale:94});
_local3.typ = _root.potvory[_local4];
_local3.strana = 2;
_local3.streh = 1;
_local3.zivotu = 1;
_local3.stavy.zivotup.gotoAndStop(11);
_local3.cislo = _local4 + 1;
_local3.hrac = HRAC2;
_local3.moralka = MORALKA2;
_local3.p.podst.gotoAndStop(_local3.strana);
if (_local3.typ < 0) {
_local3.mimo = true;
_local3.typ = -_local3.typ;
_local3._visible = false;
}
_local4++;
}
}
function jeCerna(x, y) {
return((((x >> 1) << 1) == x) == (((y >> 1) << 1) == y));
}
function pixelX(x, y) {
return((dlazba._x + dlazba.d0._x) + (dlazba.d0.plocha._width * (x - 0.5)));
}
function pixelY(x, y) {
return((dlazba._y + dlazba.d0._y) + (dlazba.d0.plocha._height * (y - 0.5)));
}
function poziceX(x, y) {
var _local1;
_local1 = Math.ceil((x - dlazba._x) / dlazba.d0.plocha._width);
if ((_local1 > DILKUX) || (_local1 < 1)) {
_local1 = 0;
}
return(_local1);
}
function poziceY(x, y) {
var _local1;
_local1 = Math.ceil((y - dlazba._y) / dlazba.d0.plocha._height);
if ((_local1 > DILKUY) || (_local1 < 1)) {
_local1 = 0;
}
return(_local1);
}
function esteNetahli(strana) {
var _local2;
var _local3;
var _local5 = 0;
_local2 = 1;
while (_local2 <= this["armada" + strana].length) {
_local3 = this[this["iniciala" + strana] + _local2];
if ((_local3.zivotu > 0) && (!_local3.uzTahnul)) {
_local5++;
}
_local2++;
}
return(_local5);
}
function jeKonec() {
if (HLAVNIHRDINA1 && (this["h" + HLAVNIHRDINA1].zivotu == 0)) {
return(-2);
}
if (HLAVNIHRDINA2 && (this["p" + HLAVNIHRDINA2].zivotu == 0)) {
return(2);
}
if (VIP1 && (this["h" + VIP1].zivotu == 0)) {
return(-3);
}
if (VIP2 && (this["p" + VIP2].zivotu == 0)) {
return(3);
}
if (VIP1 && (this["h" + VIP1].utekl)) {
return(1);
}
if (VIP2 && (this["p" + VIP2].utekl)) {
return(-1);
}
if ((POKLAD1 && (this["p" + zlodej1].utekl)) && ((!HLAVNIHRDINA2) || (this["p" + HLAVNIHRDINA2].utekl))) {
return(-4);
}
if ((POKLAD2 && (this["h" + zlodej2].utekl)) && ((!HLAVNIHRDINA1) || (this["h" + HLAVNIHRDINA1].utekl))) {
return(4);
}
var _local3 = 0;
var _local4 = 0;
x = 0;
while (x < _root.postavy.length) {
if (!this["h" + (x + 1)].neni()) {
_local3++;
}
x++;
}
x = 0;
while (x < _root.potvory.length) {
if (!this["p" + (x + 1)].neni()) {
_local4++;
}
x++;
}
if (_local3 && (_local4)) {
return(0);
}
if (!_local3) {
return(-5);
}
if (!pocetPrezivsich(neNaTahu)) {
return(5);
}
return(5);
}
function urciVysledek() {
}
function rozvrstvi(typNatoceni) {
var _local2;
var _local6;
var _local8;
var _local5;
var _local4;
var _local7 = 1;
while (_local7 <= DILKUY) {
var _local3 = 1;
while (_local3 <= DILKUX) {
_local2 = figurkaNa(_local3, _local7);
if (_local2) {
if (_local2.strana == 1) {
_local8 = 2;
} else {
_local8 = 1;
}
_local6 = this.createEmptyMovieClip("novejKlip", this.getNextHighestDepth());
_local2.swapDepths(_local6);
if (typNatoceni == 2) {
natocSeSpravne(_local2);
} else if (typNatoceni == 1) {
_local5 = Math.ceil(DILKUX / 2);
_local4 = Math.ceil(DILKUY / 2);
if ((!this[("RAZENI" + _local2.strana) + "X"]) && (!this[("RAZENI" + _local2.strana) + "Y"])) {
_local5 = _local5 * -1;
_local4 = _local4 * -1;
}
natocSeSpravne(_local2, _local5 + (_local5 - _local2.posX), _local4 + (_local4 - _local2.posY));
}
_local6.removeMovieClip();
}
_local3++;
}
_local7++;
}
}
function obnovVsem(strana, vlastnost) {
var _local3;
var _local5;
var _local4;
if (strana == 2) {
_local5 = "p";
_local4 = _root.potvory;
} else {
_local5 = "h";
_local4 = _root.postavy;
}
x = 1;
while (x <= _local4.length) {
_local3 = this[_local5 + x];
_local3.obnovStav(vlastnost);
x++;
}
}
function init(dimX, dimY) {
policka = new Array(dimX);
var _local3 = 0;
while (_local3 < dimX) {
this["rady" + _local3] = new Array(dimY);
policka[_local3] = this["rady" + _local3];
_local3++;
}
_local3 = 1;
while (_local3 <= dimX) {
y = 1;
while (y <= dimY) {
obsadPole(_local3, y, 0);
y++;
}
_local3++;
}
if (_root.krev.kapek) {
_root.krev.duplicateMovieClip("_root.bojiste.krev", this.getNextHighestDepth());
krev._visible = true;
} else {
this.createEmptyMovieClip("krev", this.getNextHighestDepth());
}
krev._x = dlazba._x;
krev._y = dlazba._y;
krev.kapek = 0;
}
function cakejNaPodlahu(x, y) {
var _local2;
var _local3;
if (_root.krev == 1) {
return(0);
}
krev.kapek++;
if (_root.krev > 1) {
_local2 = krev.attachMovie("cakanec", "k" + krev.kapek, krev.getNextHighestDepth());
} else {
_local2 = krev.attachMovie("rozhozeny", "k" + krev.kapek, krev.getNextHighestDepth());
}
if (_root.krev > 1) {
_local3 = random(200) + 10;
} else {
_local3 = random(100) + 60;
}
_local2._yscale = _local3;
_local2._xscale = _local3;
if (_root.krev > 1) {
_local2._xscale = _local2._xscale + random(50);
}
if (random(2)) {
_local2._xscale = _local2._xscale * -1;
}
_local2._x = ((pixelX(x, y) - dlazba._x) + random(60)) - random(60);
_local2._y = ((pixelY(x, y) - dlazba._y) + random(40)) - random(40);
_local2.gotoAndStop(random(3) + 1);
}
function barvaPole(x, y) {
return(policka[x - 1][y - 1].strana);
}
function obsadPole(x, y, kym) {
policka[x - 1][y - 1] = kym;
}
function uvolniPole(x, y) {
policka[x - 1][y - 1] = 0;
}
function obsad(kdo, x, y) {
kdo.posX = x;
kdo.posY = y;
obsadPole(x, y, kdo);
}
function uvolni(kdo) {
uvolniPole(kdo.posX, kdo.posY);
}
function presun(kdo, x, y) {
uvolni(kdo);
if (naPlanu(x, y)) {
obsad(kdo, x, y);
} else {
kdo.utekl = true;
kdo.nastavUzTahnul(true);
kdo.kroku = 0;
kdo._visible = false;
}
var _local4;
if (kdo.strana == 1) {
_local4 = 2;
} else {
_local4 = 1;
}
if (((this[("POKLAD" + _local4) + "X"] == kdo.posX) && (this[("POKLAD" + _local4) + "Y"] == kdo.posY)) && (!this["zlodej" + _local4])) {
this["zlodej" + _local4] = kdo.cislo;
this["poklad" + _local4]._visible = false;
zvetsiMoralku(_local4, 5);
_root.zvuky.signal1.start();
}
}
function zvetsiMoralku(strana, kolik) {
var _local3 = this["armada" + strana];
var _local4 = this["iniciala" + strana];
var _local2 = 1;
while (_local2 <= _local3.length) {
this[_local4 + _local2].moralka = this[_local4 + _local2].moralka + kolik;
_local2++;
}
}
function stvorUteky() {
var _local6;
var _local2;
var _local4;
var _local5;
var _local3;
_local4 = 1;
while (_local4 <= 2) {
if (this["UTEK" + _local4] == 5) {
_local3 = 1;
} else {
_local3 = 0;
}
_local5 = 1;
while (_local5 <= 4) {
if (this["UTEK" + _local4] == _local5) {
this[(("u" + _local4) + "_") + _local5] = 1;
} else {
this[(("u" + _local4) + "_") + _local5] = _local3;
}
_local5++;
}
_local4++;
}
_local4 = 1;
while (_local4 <= 2) {
_local6 = this["UTEK" + _local4];
if ((_local6 == 5) || (_local6 == 1)) {
_local2 = cestaKuteku0.duplicateMovieClip("utek1", this.getNextHighestDepth());
_local2._yscale = -75;
_local2.p._width = (DILKUX * dlazba.d0.plocha._width) + 2;
_local2._x = dlazba._x;
_local2._y = dlazba._y;
_local2._alpha = 50;
_local2.v._x = Math.round(_local2.p._width / 4);
_local3 = 0;
_local2.smerX = 0;
_local2.smerY = -1;
if (this.u1_1) {
_local3 = _local3 + 1;
}
if (this.u2_1) {
_local3 = _local3 + 2;
}
_local2.v.gotoAndStop(_local3);
}
if ((_local6 == 5) || (_local6 == 2)) {
_local2 = cestaKuteku0.duplicateMovieClip("utek2", this.getNextHighestDepth());
_local2._rotation = 270;
_local2.p._width = (DILKUY * dlazba.d0.plocha._height) + 2;
_local2._x = dlazba._x + (DILKUX * dlazba.d0.plocha._width);
_local2._y = dlazba._y + (DILKUY * dlazba.d0.plocha._height);
_local2._alpha = 50;
_local2.v._x = Math.round(_local2.p._width / 4);
_local3 = 0;
_local2.smerX = 1;
_local2.smerY = 0;
if (this.u1_2) {
_local3 = _local3 + 1;
}
if (this.u2_2) {
_local3 = _local3 + 2;
}
_local2.v.gotoAndStop(_local3);
}
if ((_local6 == 5) || (_local6 == 3)) {
_local2 = cestaKuteku0.duplicateMovieClip("utek3", this.getNextHighestDepth());
_local2._yscale = 75;
_local2.p._width = (DILKUX * dlazba.d0.plocha._width) + 2;
_local2._x = dlazba._x;
_local2._y = dlazba._y + (DILKUY * dlazba.d0.plocha._height);
_local2._alpha = 50;
_local2.v._x = Math.round(_local2.p._width / 4);
_local2.v._y = _local2.v._y + 15;
_local3 = 0;
_local2.smerX = 0;
_local2.smerY = 1;
if (this.u1_3) {
_local3 = _local3 + 1;
}
if (this.u2_3) {
_local3 = _local3 + 2;
}
_local2.v.gotoAndStop(_local3);
}
if ((_local6 == 5) || (_local6 == 4)) {
_local2 = cestaKuteku0.duplicateMovieClip("utek4", this.getNextHighestDepth());
_local2._rotation = 90;
_local2.p._width = (DILKUY * dlazba.d0.plocha._height) + 2;
_local2._x = dlazba._x;
_local2._y = dlazba._y;
_local2._alpha = 50;
_local2.v._x = Math.round(_local2.p._width / 4);
_local3 = 0;
_local2.smerX = -1;
_local2.smerY = 0;
if (this.u1_4) {
_local3 = _local3 + 1;
}
if (this.u2_4) {
_local3 = _local3 + 2;
}
_local2.v.gotoAndStop(_local3);
}
_local4++;
}
cestaKuteku0._visible = false;
}
function centruj() {
dlazba._x = (400 - _x) - Math.floor(dlazba._width / 2);
dlazba._y = (310 - _y) - Math.floor(dlazba._height / 2);
umistiMenu();
popisky._x = 400 - _x;
}
function stvorMenu() {
var _local2;
buton0._visible = false;
_local2 = buton0.duplicateMovieClip("buton1", this.getNextHighestDepth());
_local2.cislo = 1;
_local2.napis = "QUIT";
_local2 = buton0.duplicateMovieClip("buton2", this.getNextHighestDepth());
_local2.cislo = 2;
_local2.napis = "BANNERS";
_local2 = buton0.duplicateMovieClip("buton3", this.getNextHighestDepth());
_local2.cislo = 3;
_local2.napis = "MUSIC";
_local2 = buton0.duplicateMovieClip("buton4", this.getNextHighestDepth());
_local2.cislo = 4;
_local2.napis = "END TURN";
}
function umistiMenu() {
var _local3;
var _local2;
buton1._x = (dlazba._x + (DILKUX * dlazba.d0.plocha._width)) - buton1._width;
buton1._y = (dlazba._y + (DILKUY * dlazba.d0.plocha._height)) + 11;
_local2 = 2;
while (_local2 < 5) {
_local3 = this["buton" + _local2];
_local3._x = (this["buton" + (_local2 - 1)]._x - _local3._width) - 1;
_local3._y = (dlazba._y + (DILKUY * dlazba.d0.plocha._height)) + 11;
_local2++;
}
}
function ukazMenu(videt) {
var _local2 = 1;
while (_local2 < 5) {
if (videt) {
this["buton" + _local2]._visible = true;
} else {
this["buton" + _local2]._visible = false;
}
_local2++;
}
}
function menuAkce(kolik) {
switch (kolik) {
case 1 :
if (_root.testovaniDeje) {
_root.prohlas("vyhralCoDal");
} else {
_parent.gotoAndPlay("menu");
}
break;
case 2 :
if (!viditelnostStitku) {
viditelnostStitku = 60;
} else {
viditelnostStitku = 0;
}
break;
case 3 :
if (!_root.ticho) {
_root.ticho = true;
} else {
_root.ticho = false;
}
_root.hudboHraj("bitka");
break;
case 4 :
tahnouci.uzTahnul = true;
tahnouci.bylNapor = 0;
zmenTah();
}
}
DILKUX = 9;
DILKUY = 9;
viditelnostStitku = 0;
HRAC1 = 1;
HRAC2 = 0;
HLAVNIHRDINA1 = 0;
HLAVNIHRDINA2 = 0;
VIP1 = 0;
VIP2 = 0;
POKLAD1 = 0;
POKLAD2 = 1;
POKLAD1X = 0;
POKLAD1Y = 0;
POKLAD2X = 9;
POKLAD2Y = 1;
zlodej1 = 0;
zlodej2 = 0;
UTEK1 = 4;
UTEK2 = 2;
MORALKA1 = 0;
MORALKA2 = 0;
RAZENI1X = -1;
RAZENI1Y = 1;
RAZENI2X = 1;
RAZENI2Y = -1;
vysledekBoje = 0;
armada1 = _root.postavy;
armada2 = _root.potvory;
iniciala1 = "h";
iniciala2 = "p";
this.onEnterFrame = function () {
testujBytosti();
if (!vysledekBoje) {
dalsiKrok();
}
};
this.onMouseMove = function () {
ukazDleKurzoru();
};
this.onMouseDown = function () {
if (!myska) {
klikNaDesku();
}
myska = true;
};
this.onMouseUp = function () {
myska = false;
};
cinnost = new Zalezitost2D();
cesty = new Array(DILKUX);
var x = 0;
while (x < DILKUX) {
this["rady" + x] = new Array(DILKUY);
cesty[x] = this["rady" + x];
x++;
}
frontaDalky = new Array();
lihnuti = new Array(new Array(), new Array(2, 0, -2, 0, 4, 0, -4, 0, 6, 0, -6, 0, 1, 1, -1, 1, 3, 1, -3, 1, 5, 1, -5, 1, 0, 2, -2, 2, 2, 2, -4, 2, 4, 2, -6, 2, 6, 2), new Array(2, 0, -1, 1, 1, 1, 0, 2, 2, 2, 3, 1, 1, 3, -1, 3, 4, 0, 0, 4, 3, 3, 4, 2, 2, 4, 5, 1, 1, 5, 6, 0, 0, 6, -1, 5), new Array(1, 1, -1, 1, -1, -1, 1, -1, 2, 0, 0, 2, -2, 0, 0, -2));
bylUrcenVysledek = false;
prijmiPodminky();
stvorMenu();
Symbol 695 MovieClip Frame 2
centruj();
init(DILKUX, DILKUY);
stvorUteky();
stvorPoklady();
stvorPotvory();
stvorPostavy();
gotoAndStop (3);
Symbol 695 MovieClip Frame 3
if (HRAC1) {
aplikujZraneni(1);
} else {
aplikujZraneni(2);
}
nasackuj(1, RAZENI1X, RAZENI1Y);
nasackuj(2, RAZENI2X, RAZENI2Y);
zkusenostTed = 0;
naTahu = 0;
kdoTahne = 0;
kroku = 0;
if ((!HRAC1) && (HRAC2)) {
naTahu = 1;
}
tah = 0;
casNaUstup = false;
zmenTah();
rozvrstvi(1);
pokracuj();
ukazMoznosti();
vysvetli(0);
if (poucka.length && (_root.napoveda)) {
stuj();
_root.prohlas(poucka);
}
_root.hudboHraj(3);
stop();
Symbol 695 MovieClip Frame 5
Symbol 702 MovieClip Frame 1
stop();
Symbol 724 MovieClip Frame 1
function init() {
var _local3;
var _local4;
var _local6;
var _local7;
var _local5;
_local3 = 0;
while (_local3 < _root.postavy.length) {
_local4 = postava0.duplicateMovieClip("postava" + (_local3 + 1), this.getNextHighestDepth());
_local4.nastav(_root.postavy[_local3], 1, 1, -1);
_local4.p.podst._visible = false;
_local4._x = postava0._x + (45 * _local3);
_local6 = c0.duplicateMovieClip("c" + (_local3 + 1), this.getNextHighestDepth());
_local6._x = c0._x + (45 * (_local3 + 0));
_local7 = _local4.maxStav(2);
_local5 = _root.zraneni[_local3];
if (!_local5) {
_local5 = 0;
}
_local6.textik = Math.round(((_local7 - _local5) / _local7) * 100);
_local3++;
}
postava0._visible = false;
c0._visible = false;
}
function zobraz() {
var _local3;
var _local4;
var _local7;
var _local6;
var _local5;
_local3 = 0;
while (_local3 < _root.postavy.length) {
_local4 = this["postava" + (_local3 + 1)];
_local4.nastav(_root.postavy[_local3], 1, 1, 1);
_local4.stin._visible = false;
_local4.stavy._visible = false;
_local7 = this["c" + (_local3 + 1)];
_local6 = _local4.maxStav(2);
_local5 = _root.zraneni[_local3];
if (!_local5) {
_local5 = 0;
}
_local7.textik = Math.round(((_local6 - _local5) / _local6) * 100);
_local3++;
}
}
init();
Symbol 724 MovieClip Frame 2
zobraz();
stop();
Symbol 727 Button
on (release) {
if (_parent.dialog) {
_parent.play();
} else {
_parent.ulozDruzinu();
_parent.gotoAndPlay(_parent.naStrane + "b");
}
}
Symbol 751 Button
on (release) {
gotoAndStop ("prerus1");
}
Symbol 752 Button
on (release) {
gotoAndStop ("prerus2");
}
Symbol 787 MovieClip Frame 1
function nasad(kolik, prvni, druhej, bezPoucky) {
var _local2;
var _local3;
if (prvni) {
_local3 = armady[kolik * 2];
_local2 = 0;
while (_local2 < _local3.length) {
if (!_local3[_local2]) {
_local2++;
}
_root.postavy.push(_local3[_local2]);
_local2++;
}
}
if (druhej) {
_local3 = armady[(kolik * 2) + 1];
_local2 = 0;
while (_local2 < _local3.length) {
if (!_local3[_local2]) {
_local2++;
}
_root.potvory.push(_local3[_local2]);
_local2++;
}
}
if (bezPoucky) {
_root.poucka = "";
} else {
_root.poucka = poucky[kolik];
}
}
function naverbuj(typ, kolik, kam) {
var _local7;
var _local3;
var _local2;
_local3 = kolik;
while (_local3 > 0) {
if (typ == 0) {
_local2 = random(5) + 1;
} else if (typ == 1) {
_local2 = random(13) + 1;
} else if (typ == 2) {
if (random(2)) {
_local2 = 17;
} else {
_local2 = random(7) + 17;
}
} else {
_local2 = random(3) + 14;
}
if ((_local2 == 21) || (_local2 == 22)) {
_local2 = 17;
}
kam.push(_local2);
_root.zraneni.push(0);
_local3--;
}
}
function rozjedTo() {
_parent.gotoAndPlay("game");
}
function defaultuj() {
_root.DILKUX = (9 + (2 * random(2))) - (2 * random(2));
_root.DILKUY = 9;
_root.RAZENI1X = random(3) - 1;
_root.RAZENI2X = _root.RAZENI1X * -1;
_root.RAZENI1Y = (random(2) * 2) - 1;
_root.RAZENI2Y = _root.RAZENI1Y * -1;
_root.HRAC1 = 1;
_root.HRAC2 = 0;
_root.POKLAD1 = 0;
_root.POKLAD1X = 0;
_root.POKLAD1Y = 0;
_root.POKLAD2 = 0;
_root.POKLAD2X = 0;
_root.POKLAD2Y = 0;
_root.HLAVNIHRDINA1 = 1;
_root.HLAVNIHRDINA2 = 0;
_root.VIP1 = 0;
_root.VIP2 = 0;
_root.UTEK1 = random(6);
_root.UTEK2 = random(6);
_root.MORALKA1 = 0;
_root.MORALKA2 = 0;
_root.POSILA1CAS = 0;
_root.POSILA2CAS = 0;
}
function odpocivej() {
if (dalsiDen(false)) {
var _local2 = 0;
while (_local2 < _root.zraneni.length) {
_root.zraneni[_local2] = 0;
_local2++;
}
}
}
function dalsiDen(nelecit) {
if (_root.dnuZbyva < -10) {
return(0);
}
if (_root.dnuZbyva == undefined) {
_root.dnuZbyva = 18;
} else {
_root.dnuZbyva--;
}
if (_root.dnuZbyva <= 0) {
stop();
gotoAndPlay ("konec");
return(_root.dnuZbyva);
}
var _local2;
if (_root.dnuZbyva > 1) {
denText = _root.dnuZbyva + " days left";
} else {
denText = "The last day left";
}
if (nelecit) {
return(_root.dnuZbyva);
}
if ((!_root.nelzeOdpocivat) && (_root.ranenych())) {
stop();
_root.prohlas("lecit");
}
return(_root.dnuZbyva);
}
poucky = new Array("", "shield", "retreat", "strelci", "monk", "flee", "", "wolf", "sorceress", "shaman", "troll", "", "wounds", "", "", "marksman", "", "darkLady");
armady = new Array(new Array(), new Array(), new Array(), new Array(0, 17), new Array(), new Array(0, 17, 17), new Array(), new Array(0, 17, 17, 20), new Array(0, 13, 11), new Array(0, 18, 20, 17, 17), new Array(0, 11, 12), new Array(0, 18, 20, 20, 17, 17, 17, 17, 17, -17, -17, -17, -18), new Array(), new Array(0, 17, 17, 17), new Array(), new Array(0, 14, 15, 14, 14), new Array(), new Array(0, 15, 15, 14, 16, 14), new Array(), new Array(0, 17, 17, 19, 17, 17), new Array(), new Array(0, 21), new Array(), new Array(0, 21, 21), new Array(), new Array(0, 21, 15, 14), new Array(), new Array(0, 15, 14, 16, 15, 14), new Array(), new Array(0, 19, 20, 17, 17), new Array(), new Array(0, 17, 19, 20, 17, 17, 20, 17, 18, 17, 0, -17, -17), new Array(), new Array(0, 21, 21, 17, 17, 17, 17), new Array(), new Array(0, 22, 17, 17, 17));
stavyZmiz = true;
Symbol 787 MovieClip Frame 2
naStrane = _root.naStrane;
_root.hudboHraj(2);
plan.cacheAsBitmap = true;
_root.prohlas("");
gotoAndPlay(naStrane + "a");
Symbol 787 MovieClip Frame 6
while (_root.postavy.length) {
_root.postavy.pop();
}
_root.postavy.push(_root.typHrace);
Symbol 787 MovieClip Frame 8
fig1.nastav(_root.typHrace, 1, 1, -1, true);
Symbol 787 MovieClip Frame 32
fig2.nastav(17, 2, -1, 1, true);
Symbol 787 MovieClip Frame 39
stop();
Symbol 787 MovieClip Frame 40
prevFrame();
Symbol 787 MovieClip Frame 41
nasad(1, false, true);
defaultuj();
_root.MORALKA2 = 3;
_root.UTEK1 = 0;
_root.UTEK2 = 0;
rozjedTo();
Symbol 787 MovieClip Frame 42
stop();
Symbol 787 MovieClip Frame 43
fig1.nastav(_root.typHrace, 1, 1, -1, true);
Symbol 787 MovieClip Frame 53
if (_root.diff < 2) {
fig2.nastav(17, 2, -1, 1, true);
} else {
fig2.nastav(18, 2, -1, 1, true);
}
Symbol 787 MovieClip Frame 54
fig3.nastav(17, 2, -1, 1, true);
Symbol 787 MovieClip Frame 58
Symbol 787 MovieClip Frame 60
Symbol 787 MovieClip Frame 65
stop();
Symbol 787 MovieClip Frame 66
prevFrame();
Symbol 787 MovieClip Frame 67
nasad(2, false, true);
if (_root.diff > 1) {
_root.potvory.pop();
_root.potvory.push(18);
}
defaultuj();
_root.MORALKA2 = 2;
_root.UTEK1 = 0;
_root.UTEK2 = 0;
rozjedTo();
Symbol 787 MovieClip Frame 68
stop();
Symbol 787 MovieClip Frame 69
prevFrame();
Symbol 787 MovieClip Frame 70
fig1.nastav(_root.typHrace, 1, 1, -1, true);
dialog = true;
stop();
Symbol 787 MovieClip Frame 77
fig2.nastav(13, 3, -1, 1, true);
Symbol 787 MovieClip Frame 84
stop();
Symbol 787 MovieClip Frame 85
stop();
Symbol 787 MovieClip Frame 86
stop();
Symbol 787 MovieClip Frame 92
stop();
Symbol 787 MovieClip Frame 93
stop();
Symbol 787 MovieClip Frame 94
fig2.nastav(11, 1, 1, -1, true);
fig3.nastav(20, 2, -1, 1, true);
fig4.nastav(17, 2, -1, 1, true);
fig5.nastav(17, 2, -1, 1, true);
dialog = false;
stop();
Symbol 787 MovieClip Frame 95
prevFrame();
Symbol 787 MovieClip Frame 96
nasad(3, false, true);
if (_root.diff > 1) {
_root.potvory.push(17);
}
_root.postavy.push(11);
defaultuj();
_root.DILKUX = 11;
_root.DILKUY = 3;
_root.UTEK1 = 0;
_root.UTEK2 = 0;
_parent.uzdravSkupinu(1, 100);
rozjedTo();
Symbol 787 MovieClip Frame 97
stop();
Symbol 787 MovieClip Frame 98
prevFrame();
Symbol 787 MovieClip Frame 99
fig1.nastav(_root.typHrace, 1, 1, -1, true);
dialog = true;
stop();
Symbol 787 MovieClip Frame 103
dialog = false;
Symbol 787 MovieClip Frame 104
nasad(4, true, true);
defaultuj();
_root.UTEK1 = 0;
_root.UTEK2 = 0;
rozjedTo();
Symbol 787 MovieClip Frame 105
stop();
Symbol 787 MovieClip Frame 106
prevFrame();
Symbol 787 MovieClip Frame 107
fig1.nastav(_root.typHrace, 1, -1, 1, true);
dialog = true;
Symbol 787 MovieClip Frame 108
stop();
Symbol 787 MovieClip Frame 109
dialog = false;
Symbol 787 MovieClip Frame 110
fig1.nastav(_root.typHrace, 1, -1, 1, true);
fig2.nastav(18, 2, 1, -1, true);
fig3.nastav(17, 2, -1, -1, true);
fig4.nastav(17, 2, -1, 1, true);
fig5.nastav(17, 2, 1, 1, true);
stop();
Symbol 787 MovieClip Frame 111
nasad(5, true, true);
if (_root.diff > 1) {
_root.potvory.push(-17);
_root.potvory.push(17);
}
defaultuj();
_root.DILKUX = 11;
_root.DILKUY = 9;
_root.UTEK1 = 2;
_root.UTEK2 = 0;
_root.VIP1 = 1;
_root.RAZENI2X = 1;
_root.RAZENI2Y = -1;
_root.RAZENI1X = -1;
_root.RAZENI1Y = 1;
_root.POSILA2CAS = 2;
_root.POSILA2X = -1;
_root.POSILA2Y = -1;
rozjedTo();
Symbol 787 MovieClip Frame 112
stop();
Symbol 787 MovieClip Frame 113
prevFrame();
Symbol 787 MovieClip Frame 114
while (_root.postavy.length) {
_root.postavy.pop();
}
while (_root.zraneni.length) {
_root.zraneni.pop();
}
_root.postavy.push(_root.typHrace);
fig1.nastav(_root.typHrace, 1, -1, -1, true);
dialog = true;
Symbol 787 MovieClip Frame 115
ohen.zapal(40);
Symbol 787 MovieClip Frame 121
fig2.nastav(22, 2, -1, -1, true);
Symbol 787 MovieClip Frame 125
ohen2.zapal(30);
Symbol 787 MovieClip Frame 139
stop();
Symbol 787 MovieClip Frame 145
fig2.nastav(13, 3, -1, 1, true);
fig2.stin._visible = false;
fig3.nastav(13, 1, 1, -1, true);
fig4.nastav(12, 1, -1, 1, true);
Symbol 787 MovieClip Frame 147
stop();
Symbol 787 MovieClip Frame 148
stop();
Symbol 787 MovieClip Frame 149
stop();
Symbol 787 MovieClip Frame 150
stop();
Symbol 787 MovieClip Frame 151
stop();
Symbol 787 MovieClip Frame 152
stop();
Symbol 787 MovieClip Frame 153
stop();
Symbol 787 MovieClip Frame 154
if (_root.diff < 2) {
gotoAndPlay ("6aa");
} else {
nextFrame();
}
Symbol 787 MovieClip Frame 156
while (_root.postavy.length) {
_root.postavy.pop();
}
while (_root.zraneni.length) {
_root.zraneni.pop();
}
_root.postavy.push(_root.typHrace);
if (_root.diff < 2) {
_root.postavy.push(13);
}
_root.postavy.push(27);
play();
Symbol 787 MovieClip Frame 165
dalsiDen();
stop();
Symbol 787 MovieClip Frame 170
fig2.nastav(17, 2, 1, 1, true);
Symbol 787 MovieClip Frame 174
stop();
Symbol 787 MovieClip Frame 180
dialog = false;
stop();
Symbol 787 MovieClip Frame 181
prevFrame();
Symbol 787 MovieClip Frame 182
nasad(6, false, true);
defaultuj();
rozjedTo();
Symbol 787 MovieClip Frame 183
stop();
Symbol 787 MovieClip Frame 184
prevFrame();
Symbol 787 MovieClip Frame 185
fig1.nastav(_root.typHrace, 1, -1, -1, true);
dalsiDen();
Symbol 787 MovieClip Frame 187
fig2.nastav(14, 2, 1, 1, true);
Symbol 787 MovieClip Frame 193
stop();
Symbol 787 MovieClip Frame 194
nasad(7, false, true);
defaultuj();
rozjedTo();
Symbol 787 MovieClip Frame 195
stop();
Symbol 787 MovieClip Frame 196
prevFrame();
Symbol 787 MovieClip Frame 197
fig1.nastav(_root.typHrace, 1, -1, -1, true);
dalsiDen();
Symbol 787 MovieClip Frame 199
fig2.nastav(4, 3, 1, 1, true);
Symbol 787 MovieClip Frame 214
dialog = true;
stop();
Symbol 787 MovieClip Frame 215
stop();
Symbol 787 MovieClip Frame 216
fig2.natocSe(-1, -1);
Symbol 787 MovieClip Frame 224
fig3.nastav(14, 2, -1, 1, true);
stop();
Symbol 787 MovieClip Frame 228
_root.postavy.push(4);
nasad(8, false, true);
defaultuj();
rozjedTo();
Symbol 787 MovieClip Frame 229
stop();
Symbol 787 MovieClip Frame 230
prevFrame();
Symbol 787 MovieClip Frame 231
fig1.nastav(_root.typHrace, 1, -1, -1, true);
dalsiDen();
Symbol 787 MovieClip Frame 232
dialog = true;
stop();
Symbol 787 MovieClip Frame 243
dialog = false;
fig2.nastav(18, 2, 1, 1, true);
stop();
Symbol 787 MovieClip Frame 244
nasad(9, false, true);
defaultuj();
rozjedTo();
Symbol 787 MovieClip Frame 245
stop();
Symbol 787 MovieClip Frame 246
prevFrame();
Symbol 787 MovieClip Frame 247
fig1.nastav(_root.typHrace, 1, -1, -1, true);
dalsiDen();
dialog = true;
Symbol 787 MovieClip Frame 250
fig2.nastav(28, 3, 1, 1, true);
Symbol 787 MovieClip Frame 259
stop();
Symbol 787 MovieClip Frame 260
stop();
Symbol 787 MovieClip Frame 261
stop();
Symbol 787 MovieClip Frame 262
stop();
Symbol 787 MovieClip Frame 263
stop();
Symbol 787 MovieClip Frame 264
stop();
Symbol 787 MovieClip Frame 265
fig2.nastav(11, 3, -1, -1, true);
Symbol 787 MovieClip Frame 279
fig3.nastav(21, 2, 1, 1, true);
dialog = false;
stop();
Symbol 787 MovieClip Frame 280
_root.postavy.push(11);
_root.postavy.push(14);
nasad(10, false, true);
defaultuj();
rozjedTo();
Symbol 787 MovieClip Frame 281
stop();
Symbol 787 MovieClip Frame 282
prevFrame();
Symbol 787 MovieClip Frame 283
fig1.nastav(_root.typHrace, 1, -1, -1, true);
dalsiDen();
Symbol 787 MovieClip Frame 293
fig2.nastav(21, 2, 1, 1, true);
Symbol 787 MovieClip Frame 301
stop();
Symbol 787 MovieClip Frame 302
prevFrame();
Symbol 787 MovieClip Frame 303
nasad(11, false, true);
defaultuj();
rozjedTo();
Symbol 787 MovieClip Frame 304
stop();
Symbol 787 MovieClip Frame 305
prevFrame();
Symbol 787 MovieClip Frame 306
fig1.nastav(_root.typHrace, 1, -1, -1, true);
dalsiDen();
Symbol 787 MovieClip Frame 318
fig2.nastav(21, 2, 1, 1, true);
Symbol 787 MovieClip Frame 325
stop();
Symbol 787 MovieClip Frame 326
prevFrame();
Symbol 787 MovieClip Frame 327
nasad(12, false, true);
defaultuj();
rozjedTo();
Symbol 787 MovieClip Frame 328
stop();
Symbol 787 MovieClip Frame 329
prevFrame();
Symbol 787 MovieClip Frame 330
dialog = true;
fig1.nastav(_root.typHrace, 1, -1, -1, true);
dalsiDen();
Symbol 787 MovieClip Frame 331
stop();
Symbol 787 MovieClip Frame 333
fig2.nastav(15, 2, 1, 1, true);
Symbol 787 MovieClip Frame 351
dialog = false;
stop();
Symbol 787 MovieClip Frame 352
prevFrame();
Symbol 787 MovieClip Frame 353
nasad(13, false, true);
defaultuj();
rozjedTo();
Symbol 787 MovieClip Frame 354
stop();
Symbol 787 MovieClip Frame 355
prevFrame();
Symbol 787 MovieClip Frame 356
fig1.nastav(_root.typHrace, 1, -1, -1, true);
dalsiDen();
Symbol 787 MovieClip Frame 379
fig2.nastav(19, 2, 1, 1, true);
stop();
Symbol 787 MovieClip Frame 380
prevFrame();
Symbol 787 MovieClip Frame 381
nasad(14, false, true);
defaultuj();
rozjedTo();
Symbol 787 MovieClip Frame 382
stop();
Symbol 787 MovieClip Frame 383
prevFrame();
Symbol 787 MovieClip Frame 384
fig1.nastav(_root.typHrace, 1, -1, -1, true);
dalsiDen();
dialog = true;
Symbol 787 MovieClip Frame 408
stop();
Symbol 787 MovieClip Frame 416
stop();
Symbol 787 MovieClip Frame 418
fig2.nastav(13, 3, 1, -1, true);
fig3.nastav(10, 3, 1, -1, true);
Symbol 787 MovieClip Frame 443
fig1.natocSe(-1, 1);
stop();
Symbol 787 MovieClip Frame 444
stop();
Symbol 787 MovieClip Frame 445
fig1.natocSe(-1, -1);
stop();
Symbol 787 MovieClip Frame 449
_root.postavy.push(10);
_root.postavy.push(13);
nasad(15, false, true);
defaultuj();
_root.DILKUX = 9;
_root.DILKUY = 9;
_root.RAZENI1X = 1;
_root.RAZENI1Y = 1;
_root.RAZENI2X = -1;
_root.RAZENI2Y = -1;
_root.POSILY2CAS = 3;
_root.POSILY2X = -1;
_root.POSILY2Y = -1;
rozjedTo();
Symbol 787 MovieClip Frame 450
stop();
Symbol 787 MovieClip Frame 451
prevFrame();
Symbol 787 MovieClip Frame 452
fig1.nastav(_root.typHrace, 1, -1, -1, true);
dalsiDen();
Symbol 787 MovieClip Frame 453
dnuZbyva = -100;
dialog = false;
stop();
Symbol 787 MovieClip Frame 465
fig2.nastav(21, 2, 1, 1, true);
dialog = false;
stop();
Symbol 787 MovieClip Frame 466
nasad(16, false, true);
defaultuj();
_root.UTEK2 = 0;
rozjedTo();
Symbol 787 MovieClip Frame 467
stop();
Symbol 787 MovieClip Frame 468
prevFrame();
Symbol 787 MovieClip Frame 469
fig1.nastav(_root.typHrace, 1, -1, -1, true);
_root.nelzeOdpocivat = true;
Symbol 787 MovieClip Frame 485
fig2.nastav(22, 2, 1, 1, true);
Symbol 787 MovieClip Frame 490
dialog = false;
stop();
Symbol 787 MovieClip Frame 491
nasad(17, false, true);
defaultuj();
_root.UTEK1 = 0;
_root.UTEK2 = 0;
rozjedTo();
Symbol 787 MovieClip Frame 492
stop();
Symbol 787 MovieClip Frame 493
prevFrame();
Symbol 787 MovieClip Frame 495
fig1.nastav(_root.typHrace, 1, -1, -1, true);
_root.prohlas("temnaPaniMrtva");
stop();
Symbol 787 MovieClip Frame 496
_root.nelzeOdpocivat = false;
_root.gotoAndPlay("menu");
stop();
Symbol 787 MovieClip Frame 503
_root.prohlas("nestihl");
Symbol 787 MovieClip Frame 504
stop();