Frame 1
stop();
krajina = 0;
pocet_hracu = 2;
_quality = "HIGH";
debugging = true;
Frame 2
weapons = new Array();
weapons[1] = ["bmissile", "Small missile", 0, 0, "bmissile_g"];
weapons[0] = ["missile", "Missile", 0, 100, "missile_g"];
weapons[2] = ["bnuke", "Small atom bomb", 0, 200, "bnuke_g"];
weapons[3] = ["nuke", "Atom bomb", 0, 100, "nuke_g"];
weapons[4] = ["funky", "Volcano bomb", 0, 200, "funky_g"];
weapons[5] = ["mirv", "Shower", 0, 200, "mirv_g"];
weapons[6] = ["death", "Hot shower", 0, 100, "death_g"];
weapons[7] = ["broller", "Small ball", 0, 500, "broller_g"];
weapons[8] = ["roller", "Ball", 0, 200, "roller_g"];
weapons[9] = ["hroller", "Large ball", 0, 100, "hroller_g"];
weapons[10] = ["broller2", "Small ball V2", 0, 500, "broller2_g"];
weapons[11] = ["roller2", "Ball V2", 0, 200, "roller2_g"];
weapons[12] = ["hroller2", "Large ball V2", 0, 100, "hroller2_g"];
weapons[13] = ["astrike", "Air strike", 0, 100, "astrike_g"];
specials = new Array();
specials[0] = ["par", "Parachutes", 0, 500];
specials[1] = ["repair", "Repair kit", 0, 500];
specials[2] = ["fuel", "Fuel", 0, 50000];
specials[3] = ["sshield", "Weak shield", 0, 200, "weak_sh"];
specials[4] = ["shield", "Shield", 0, 100, "shield_sh"];
specials[5] = ["stshield", "Strong shield", 0, 100, "strong_sh"];
specials[6] = ["spshield", "Super shield", 0, 100, "super_sh"];
specials[7] = ["teleport", "Teleport", 0, 100];
specials[8] = ["upenergy", "Upgrade energy", 0, 100];
specials[9] = ["uparmor", "Upgrade armor", 0, 100];
specials[10] = ["upmove", "Upgrade engine", 0, 100];
specials[11] = ["uphill", "Upgrade hill move", 0, 100];
i = 1;
while (i < (pocet_hracu + 1)) {
_root["tank_" + i] = new Object();
_root["tank_" + i].guns = new Array();
_root["tank_" + i].specials = new Array();
x = 0;
while (x < weapons.length) {
_root["tank_" + i].guns[x] = 0;
x++;
}
x = 0;
while (x < specials.length) {
_root["tank_" + i].specials[x] = 0;
x++;
}
j = 0;
while (j < 15) {
_root["tank_" + i].guns[j] = 999;
j++;
}
_root["tank_" + i].guns[4] = 100;
_root["tank_" + i].t_num = i;
_root["tank_" + i].cur_gun = 0;
_root["tank_" + i].energy = 100000000000;
_root["tank_" + i].max_energy = 100000000000;
_root["tank_" + i].shield = 1;
_root["tank_" + i].specials[0] = 800;
_root["tank_" + i].specials[1] = 800;
_root["tank_" + i].specials[3] = 800;
_root["tank_" + i].specials[4] = 800;
_root["tank_" + i].specials[5] = 800;
_root["tank_" + i].specials[6] = 800;
_root["tank_" + i].specials[2] = 25000;
_root["tank_" + i].specials[7] = 800;
_root["tank_" + i].fuel = 50000;
_root["tank_" + i].score = 5000;
_root["tank_" + i].total_score = 0;
_root["tank_" + i].live = true;
_root["tank_" + i].kills = 0;
_root["tank_" + i].col = 3355443 /* 0x333333 */;
_root["tank_" + i].name = "";
i++;
}
if (krajina == 0) {
rand_krajina = true;
}
game = 0;
uk = "Next player";
name = "";
cur = 1;
cislo = "Player " + cur;
firstgame = true;
type = "tank";
released = false;
dif = "normal";
Instance of Symbol 389 MovieClip in Frame 2
onClipEvent (load) {
_alpha = 0;
speed = 2;
}
onClipEvent (enterFrame) {
if ((_root.type == "ai") && (_alpha < 100)) {
_alpha = (_alpha + speed);
} else if ((_root.type == "tank") && (_alpha > 0)) {
_alpha = (_alpha - speed);
}
}
Frame 3
panel._visible = false;
i = 1;
while (pocet_hracu >= i) {
_root["tank_" + i].live = true;
_root["tank_" + i].max_energy = 100 + (_root["tank_" + i].specials[8] * 10);
_root["tank_" + i].energy = _root["tank_" + i].max_energy;
_root["tank_" + i].fuel = _root["tank_" + i].specials[2];
i++;
}
game++;
Instance of Symbol 394 MovieClip "uv" in Frame 3
onClipEvent (load) {
this.swapDepths(34567);
}
Frame 4
stop();
Instance of Symbol 396 MovieClip in Frame 4
onClipEvent (load) {
i = 0;
if (_root.rand_krajina) {
_root.krajina = random(3) + 1;
}
if (_root.krajina == 1) {
_root.vitrchange = 16;
rn = 0;
while (rn == 0) {
rn = random(3) - 1;
}
_root.vitr = (random(50) + 30) * rn;
_root.attachMovie("krajina1", "pozadi", 1);
_root.pozadi._x = 274;
_root.pozadi._y = 203.4;
_root.land._x = 500;
n2 = random(200) + 100;
n3 = random(300) + 50;
n4 = random(300) + 50;
ran = random(500);
pocet = random(5) + 2;
} else if (_root.krajina == 2) {
_root.vitrchange = 12;
rn = 0;
while (rn == 0) {
rn = random(3) - 1;
}
_root.vitr = (random(25) + 25) * rn;
_root.attachMovie("krajina2", "pozadi", 1);
_root.pozadi._x = 248.8;
_root.pozadi._y = 334.6;
_root.land._y = 536;
n2 = random(100) + 50;
n3 = random(200) + 50;
n4 = random(200) + 50;
ran = random(500);
pocet = random(6) + 2;
f = random(50) + 10;
} else if (_root.krajina == 3) {
_root.vitrchange = 6;
rn = 0;
while (rn == 0) {
rn = random(3) - 1;
}
_root.vitr = random(20) * rn;
_root.attachMovie("krajina3", "pozadi", 1);
_root.pozadi._x = 274;
_root.pozadi._y = 200.6;
_root.land._y = 615;
i = 0;
rand = (random(400) / 10) + 1;
rand2 = (random(15) + 1) / 10;
}
}
onClipEvent (enterFrame) {
if (i < 540) {
f = i + 40;
}
if (_root.krajina == 1) {
while (i < f) {
duplicateMovieClip (_root.land, "land" + i, i + 8000);
_root["land" + i]._x = i;
_root["land" + i]._y = _root["land" + i]._y + (((Math.sin((3.141593 / n3) * i) * Math.cos((3.141593 / n4) * i)) * (ran - i)) / 2);
col = new Color(_root["land" + i]);
col.setRGB(16777215);
i++;
}
}
if (_root.krajina == 2) {
while (i < f) {
duplicateMovieClip (_root.land, "land" + i, i + 8000);
_root["land" + i]._x = i;
_root["land" + i]._y = _root["land" + i]._y + ((((Math.sin(0.01745329 * i) * Math.cos((3.141593 / n4) * i)) * (ran - i)) / 4) / 2);
col = new Color(_root["land" + i]);
barv = _root["land" + i]._height / 12;
mycoltrans = new Object();
mycoltrans.ra = 100;
mycoltrans.rb = 120;
mycoltrans.ga = 100;
mycoltrans.gb = 130 + barv;
mycoltrans.ba = 100;
mycoltrans.bb = 0;
mycoltrans.aa = 100;
mycoltrans.ab = 0;
col.setTransform(mycoltrans);
i++;
}
}
if (_root.krajina == 3) {
while (i < f) {
duplicateMovieClip (_root.land, "land" + i, i + 8000);
_root["land" + i]._x = i;
_root["land" + i]._y = _root["land" + i]._y + ((Math.sin((0.01745329 * i) * rand2) * rand) / 2);
col = new Color(_root["land" + i]);
barv = _root["land" + i]._height / 12;
mycoltrans = new Object();
mycoltrans.ra = 100;
mycoltrans.rb = 234;
mycoltrans.ga = 100;
mycoltrans.gb = 221;
mycoltrans.ba = 100;
mycoltrans.bb = 181;
mycoltrans.aa = 100;
mycoltrans.ab = 0;
col.setTransform(mycoltrans);
i++;
}
}
if (i >= 550) {
if (_root.krajina == 1) {
i = 0;
while (i < pocet) {
_root.attachMovie("strom_1", "strom" add i, 20000 + i);
i++;
}
}
if (_root.krajina == 2) {
f = 0;
i = 0;
while (i < 100) {
_root.attachMovie("strom_2", "strom" add i, 20000 + i);
_root["strom" + i]._x = f;
f = f + (random(30) + 8);
if (f > 550) {
break;
}
i++;
}
}
_root.uv.removeMovieClip();
_root.gotoAndPlay("hra");
}
if (i <= 500) {
_root.uv.percent._width = Math.round((i / 550) * 100) * 2;
_root.uv.percent._x = -95.3 + Math.round((i / 550) * 100);
} else {
_root.uv.percent._width = 200;
_root.uv.percent._x = 4.7;
}
}
Frame 5
function nextplayer() {
na_rade = next;
if ((na_rade.tank_number < pocet_hracu) && (hracu > 1)) {
next = eval ("tank" + Number(na_rade.tank_number + 1));
} else if (hracu > 1) {
next = tank1;
}
na_rade.playing = true;
if ((_root["tank_" + na_rade.tank_number].live == false) && (hracu > 1)) {
nextplayer();
} else if (hracu > 1) {
na_rade.blik();
}
vitr = vitr + ((-random(vitrchange)) + (vitrchange / 2));
panel.player_changed();
na_rade.na_rade();
}
function test() {
var _local1 = _root;
i = 1;
while (pocet_hracu >= i) {
_local1["tank" + i].playing = false;
_local1["tank" + i].testing = true;
_local1["tank" + i].na_zemi = false;
i++;
}
testing = true;
}
i = 1;
while (i < (pocet_hracu + 1)) {
if (_root["tank_" + i].type == "tank") {
_root.attachMovie(_root["tank_" + i].type, "tank" + i, 10000 + i);
} else {
_root.attachMovie((_root["tank_" + i].type add "_") add _root["tank_" + i].dif, "tank" + i, 10000 + i);
}
tank = _root["tank" + i];
tank.type = _root["tank_" + i].type;
col = new Color(tank.col);
col.setRGB(_root["tank_" + i].col);
tank.tank_number = i;
tank._x = random(500) + 20;
while ((_root["land" + tank._x]._y - (_root["land" + tank._x]._height / 2)) > 400) {
tank._x = random(500) + 20;
}
f = 1;
while (f < i) {
if ((tank._x < (_root["tank" + f]._x + (350 / _root.pocet_hracu))) && ((_root["tank" + f]._x - (350 / _root.pocet_hracu)) < tank._x)) {
tank._x = random(500) + 20;
while ((_root["land" + tank._x]._y - (_root["land" + tank._x]._height / 2)) > 400) {
tank._x = random(500) + 20;
}
f = 0;
}
f++;
}
tank.playing = false;
i++;
}
_root.attachMovie("panel", "panel", 1000000);
panel._x = 442.6;
panel._y = 28.4;
fired = false;
power = 50;
next = tank1;
i = 1;
while (pocet_hracu >= i) {
if (_root["tank_" + i].total_score < _root["tank_" + next.tank_number].total_score) {
next = _root["tank" + i];
}
i++;
}
hracu = pocet_hracu;
panel._visible = true;
end = false;
fuel_c = 1 / (_root["tank_" + tank_number].specials[10] + 1);
Frame 6
test();
stop();
Instance of Symbol 397 MovieClip in Frame 6
onClipEvent (enterFrame) {
if (_root.testing) {
test = false;
i = 1;
while (_root.pocet_hracu >= i) {
if ((_root["tank" + i].testing != false) && (_root["tank_" + i].live == true)) {
test = true;
break;
}
i++;
}
if (!test) {
if (_root.hracu > 1) {
_root.nextplayer();
}
_root.testing = false;
}
if (((_root.hracu < 2) && (_root.end == false)) && (_root.testing == false)) {
_root.end = true;
play();
}
}
}
Symbol 2 MovieClip [super_sh] Frame 1
function damage(dam, attacker) {
var _local1 = _root;
en = en - dam;
_alpha = Math.round((en / en_max) * 100);
if (en <= 0) {
_local1["tank" + num].sh_active = false;
_local1["t" + num] = _local1["tank" + num];
_local1["tank" + num].damage(Math.abs(en) * 2, attacker);
this.removeMovieClip();
}
}
function disable() {
this.removeMovieClip();
}
en = 600;
en_max = 600;
Symbol 4 MovieClip [strong_sh] Frame 1
function damage(dam, attacker) {
var _local1 = _root;
en = en - dam;
_alpha = Math.round((en / en_max) * 100);
if (en <= 0) {
_local1["tank" + num].sh_active = false;
_local1["t" + num] = _local1["tank" + num];
_local1["tank" + num].damage(Math.abs(en) * 2, attacker);
this.removeMovieClip();
}
}
function disable() {
this.removeMovieClip();
}
en_max = 400;
en = 400;
Symbol 6 MovieClip [shield_sh] Frame 1
function damage(dam, attacker) {
var _local1 = _root;
en = en - dam;
_alpha = Math.round((en / en_max) * 100);
if (en <= 0) {
_local1["tank" + num].sh_active = false;
_local1["t" + num] = _local1["tank" + num];
_local1["tank" + num].damage(Math.abs(en) * 2, attacker);
this.removeMovieClip();
}
}
function disable() {
this.removeMovieClip();
}
en = 200;
en_max = 200;
Symbol 8 MovieClip [weak_sh] Frame 1
function damage(dam, attacker) {
var _local1 = _root;
en = en - dam;
_alpha = Math.round((en / en_max) * 100);
if (en <= 0) {
_local1["tank" + num].sh_active = false;
_local1["t" + num] = _local1["tank" + num];
_local1["tank" + num].damage(Math.abs(en) * 2, attacker);
this.removeMovieClip();
}
}
function disable() {
this.removeMovieClip();
}
en = 100;
en_max = 100;
Symbol 17 MovieClip [teleport_a] Frame 1
stop();
_root.na_rade.playing = false;
Instance of Symbol 15 MovieClip in Symbol 17 MovieClip [teleport_a] Frame 1
onClipEvent (mouseDown) {
stopDrag();
_parent.play();
_parent.tary = _parent._y;
_parent.tarx = _parent._x;
}
Symbol 17 MovieClip [teleport_a] Frame 10
Mouse.show();
_x = _root.na_rade._x;
_y = _root.na_rade._y;
Symbol 17 MovieClip [teleport_a] Frame 17
_root.na_rade._visible = false;
_root["shield" + _root.na_rade.tank_number]._visible = false;
_root[("tank" + _root.na_rade.tank_number) + "_hlaven"]._visible = false;
Symbol 17 MovieClip [teleport_a] Frame 35
_x = tarx;
_y = tary;
Symbol 17 MovieClip [teleport_a] Frame 41
_root.na_rade._visible = true;
_root[("tank" + _root.na_rade.tank_number) + "_hlaven"]._visible = true;
_root.na_rade._x = _x;
_root.na_rade._y = _y;
_root[("tank" + _root.na_rade.tank_number) + "_hlaven"]._x = _x;
_root[("tank" + _root.na_rade.tank_number) + "_hlaven"]._y = _y - 1;
_root["shield" + _root.na_rade.tank_number]._visible = true;
_root["shield" + _root.na_rade.tank_number]._x = _x;
_root["shield" + _root.na_rade.tank_number]._y = _y;
Symbol 17 MovieClip [teleport_a] Frame 48
_root.test();
this.removeMovieClip();
Symbol 57 Button
on (release) {
if (_root["tank_" + _root.clona.cur].score >= price) {
_root.clona.purchase_weapon(num);
}
}
Symbol 63 MovieClip [weapon] Frame 1
if (_root["tank_" + _root.clona.cur].score >= price) {
w_caption = caption;
w2_caption = "";
} else {
w2_caption = caption;
w_caption = "";
}
w_price = price;
w_count = count;
t_count = _root["tank_" + _root.clona.cur].guns[num];
this.attachMovie(icon_link, "icon", 1000060 + num);
icon._y = 0.4;
icon._x = -74;
Symbol 65 Button
on (release) {
if (_root["tank_" + _root.clona.cur].score >= price) {
_root.clona.purchase_special(num);
}
}
Symbol 71 MovieClip [special] Frame 1
if (_root["tank_" + _root.clona.cur].score >= price) {
w_caption = caption;
w2_caption = "";
} else {
w2_caption = caption;
w_caption = "";
}
w_price = price;
w_count = count;
t_count = _root["tank_" + _root.clona.cur].specials[num];
this.attachMovie(icon_link, "icon", 1000120 + num);
icon._y = 0.4;
icon._x = -74;
Symbol 84 Button
on (release) {
_root.clona.next_player();
}
Symbol 88 MovieClip [clona] Frame 1
function next_player() {
var _local1 = _root;
if (cur < _local1.pocet_hracu) {
cur++;
if (_local1["tank_" + cur].type == "tank") {
view_weapons();
} else {
_local1["tank_" + cur].buy();
next_player();
}
} else {
score._visible = false;
player._visible = false;
buymenu._y = -500;
remove_weapons();
_local1.gotoAndStop(3);
stops = false;
projizdi = true;
}
st = false;
i = cur + 1;
while (_local1.pocet_hracu >= i) {
if (_local1["tank_" + i].type == "tank") {
st = true;
break;
}
i++;
}
if ((cur == _local1.pocet_hracu) || (st == false)) {
buymenu.but_capt = "Start!";
}
}
function purchasing_fc() {
view_weapons();
score._visible = true;
clr = new Color(player);
player._visible = true;
clr.setRGB(_root["tank_" + cur].col);
buymenu._x = 140;
buymenu._y = 80;
if (cur == 0) {
next_player();
}
}
function view_weapons() {
var _local1 = this;
var _local2 = _root;
i = 0;
while (i < _local2.weapons.length) {
_local1["weapon" + i].removeMovieClip();
i++;
}
sc = _local2["tank_" + cur].score;
score.score = sc;
player.player = _local2["tank_" + cur].name;
clr.setRGB(_local2["tank_" + cur].col);
i = 0;
while (i < _local2.weapons.length) {
_local1.attachMovie("weapon", "weapon" + i, 1000060 + i);
_local1["weapon" + i].icon_link = _local2.weapons[i][0];
_local1["weapon" + i].caption = _local2.weapons[i][1];
_local1["weapon" + i].price = _local2.weapons[i][2];
_local1["weapon" + i].count = _local2.weapons[i][3];
_local1["weapon" + i].num = i;
_local1["weapon" + i]._x = -140;
_local1["weapon" + i]._y = -140 + (_local1["weapon" + i]._height * i);
i++;
}
i = 0;
while (i < _local2.specials.length) {
_local1.attachMovie("special", "special" + i, 1000080 + i);
_local1["special" + i].icon_link = _local2.specials[i][0];
_local1["special" + i].caption = _local2.specials[i][1];
_local1["special" + i].price = _local2.specials[i][2];
_local1["special" + i].count = _local2.specials[i][3];
_local1["special" + i].num = i;
_local1["special" + i]._x = 140;
_local1["special" + i]._y = -140 + (_local1["special" + i]._height * i);
i++;
}
}
function purchase_weapon(num) {
var _local1 = _root;
var _local2 = num;
_local1["tank_" + cur].guns[_local2] = _local1["tank_" + cur].guns[_local2] + _local1.weapons[_local2][3];
_local1["tank_" + cur].score = _local1["tank_" + cur].score - _local1.weapons[_local2][2];
view_weapons();
}
function purchase_special(num) {
var _local1 = _root;
var _local2 = num;
_local1["tank_" + cur].specials[_local2] = _local1["tank_" + cur].specials[_local2] + _local1.specials[_local2][3];
_local1["tank_" + cur].score = _local1["tank_" + cur].score - _local1.specials[_local2][2];
view_weapons();
}
function remove_weapons() {
var _local1 = this;
i = 0;
while (i < 20) {
_local1["weapon" + i].removeMovieClip();
_local1["special" + i].removeMovieClip();
i++;
}
}
if (ch != true) {
speed = 16;
k = 920;
}
cur = 0;
Instance of Symbol 74 MovieClip "l" in Symbol 88 MovieClip [clona] Frame 1
onClipEvent (load) {
speed = _parent.speed;
first = true;
x = _x;
k = _parent.k;
}
onClipEvent (enterFrame) {
if (_root.clona.projizdi) {
speed = speed - ((137.5 + Math.abs(_x)) / k);
if (_x > -137.5) {
_x = -137.5;
_root.gotoAndStop(_parent.frame);
}
_x = (_x + speed);
if ((speed < 0) && (_x < x)) {
if (_parent.stops) {
_parent.removeMovieClip();
} else {
_root.play();
_parent.removeMovieClip();
}
}
} else if (_x < -137.5) {
speed = speed - ((137.5 + Math.abs(_x)) / k);
_x = (_x + speed);
} else {
_x = -137.5;
_root.pozadi.removeMovieClip();
_root.panel.removeMovieClip();
if (_parent.purchasing && (first)) {
first = false;
_parent.purchasing_fc();
}
}
}
Instance of Symbol 76 MovieClip "score" in Symbol 88 MovieClip [clona] Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 78 MovieClip "player" in Symbol 88 MovieClip [clona] Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 81 MovieClip "r" in Symbol 88 MovieClip [clona] Frame 1
onClipEvent (load) {
speed = _parent.speed;
k = _parent.k;
}
onClipEvent (enterFrame) {
if (_root.clona.projizdi) {
speed = speed - ((137.5 + Math.abs(_x)) / k);
_x = (_x - speed);
if (_x < 137.5) {
_x = 137.5;
}
} else if (_x > 137.5) {
speed = speed - ((137.5 + Math.abs(_x)) / k);
_x = (_x - speed);
} else {
_x = 137;
}
}
Symbol 95 MovieClip [blk] Frame 35
this.removeMovieClip();
Symbol 116 MovieClip [hlaven] Frame 1
stop();
Symbol 127 Button
on (release, keyPress "q") {
if (_root.na_rade.type == "tank") {
view_backward();
}
}
Symbol 128 Button
on (release, keyPress "w") {
if (_root.na_rade.type == "tank") {
view_forward();
}
}
Symbol 131 MovieClip Frame 1
function change_icon() {
var _local1 = _root;
this.attachMovie(_local1.weapons[_local1["tank_" + _local1.na_rade.tank_number].cur_gun][0], "gun_ico", 1000101);
gun_ico._x = -55;
gun_ico._y = 0;
name = _local1.weapons[_local1["tank_" + _local1.na_rade.tank_number].cur_gun][1];
count = _local1["tank_" + _local1.na_rade.tank_number].guns[_local1["tank_" + _local1.na_rade.tank_number].cur_gun];
}
Symbol 134 Button
on (press) {
if (_root.na_rade.type == "tank") {
if (_root["tank_" + _root.na_rade.tank_number].energy <= 100) {
startDrag ("", false, 0, 100 - _root["tank_" + _root.na_rade.tank_number].energy, 0, 100);
} else {
startDrag ("", false, 0, 0, 0, 100);
}
_parent.sdrag = true;
}
}
on (release, releaseOutside) {
_parent.sdrag = false;
stopDrag();
}
Symbol 141 Button
on (press) {
if ((_root["tank_" + _root.na_rade.tank_number].fuel > 0) && (_root.na_rade.playing)) {
left = true;
}
}
on (release, releaseOutside) {
left = false;
}
Symbol 142 Button
on (press) {
if ((_root["tank_" + _root.na_rade.tank_number].fuel > 0) && (_root.na_rade.playing)) {
right = true;
}
}
on (release, releaseOutside) {
right = false;
}
Symbol 148 Button
on (press) {
if (_root.na_rade.type == "tank") {
startDrag ("", true, -90, 0, 90, 0);
_parent.sdrag = true;
}
}
on (release, releaseOutside) {
stopDrag();
_parent.sdrag = false;
}
Symbol 154 Button
on (release) {
if (_root.na_rade.playing && (_root.na_rade.type == "tank")) {
_root.na_rade.fire();
}
}
Symbol 157 MovieClip Frame 1
stop();
Symbol 157 MovieClip Frame 2
stop();
Symbol 159 Button
on (release) {
_quality = "HIGH";
quality = "HIGH";
rad1.gotoAndStop(2);
rad2.gotoAndStop(1);
rad3.gotoAndStop(1);
}
Symbol 160 Button
on (release) {
_quality = "MEDIUM";
quality = "MEDIUM";
rad1.gotoAndStop(1);
rad3.gotoAndStop(1);
rad2.gotoAndStop(2);
}
Symbol 161 Button
on (release) {
_quality = "LOW";
quality = "LOW";
rad1.gotoAndStop(1);
rad2.gotoAndStop(1);
rad3.gotoAndStop(2);
}
Symbol 172 Button
on (release) {
if (_root["tank_" + _root.na_rade.tank_number].max_energy >= (_root["tank_" + _root.na_rade.tank_number].energy + 10)) {
_root["tank_" + _root.na_rade.tank_number].energy = _root["tank_" + _root.na_rade.tank_number].energy + 10;
} else {
_root["tank_" + _root.na_rade.tank_number].energy = _root["tank_" + _root.na_rade.tank_number].max_energy;
}
_root["tank_" + _root.na_rade.tank_number].specials[1]--;
refresh();
}
Symbol 174 MovieClip Frame 1
stop();
Symbol 179 Button
on (release) {
_root.na_rade.par = true;
refresh();
}
Symbol 182 Button
on (release) {
_root.na_rade.par = false;
refresh();
}
Symbol 183 MovieClip Frame 1
stop();
Symbol 188 Button
on (release) {
_root["tank_" + _root.na_rade.tank_number].specials[7]--;
Mouse.hide();
_root.attachMovie("teleport_a", "tel", 10100);
startDrag ("_root.tel", true);
gotoAndStop (2);
}
Symbol 190 MovieClip Frame 1
stop();
Symbol 194 Button
on (release) {
gotoAndStop (2);
}
Symbol 200 Button
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
gotoAndStop (1);
}
on (release) {
_root.na_rade.activate_shield(1);
_parent.refresh();
}
Symbol 203 MovieClip Frame 1
stop();
refresh();
Symbol 203 MovieClip Frame 2
count = _root["tank_" + _root.na_rade.tank_number].specials[3];
Symbol 204 Button
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
gotoAndStop (1);
}
on (release) {
_root.na_rade.activate_shield(2);
_parent.refresh();
}
Symbol 207 MovieClip Frame 1
stop();
refresh();
Symbol 207 MovieClip Frame 2
count = _root["tank_" + _root.na_rade.tank_number].specials[4];
Symbol 212 Button
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
gotoAndStop (1);
}
on (release) {
_root.na_rade.activate_shield(3);
_parent.refresh();
}
Symbol 214 MovieClip Frame 1
stop();
refresh();
Symbol 214 MovieClip Frame 2
count = _root["tank_" + _root.na_rade.tank_number].specials[5];
Symbol 218 Button
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
gotoAndStop (1);
}
on (release) {
_root.na_rade.activate_shield(4);
_parent.refresh();
}
Symbol 220 MovieClip Frame 1
stop();
refresh();
Symbol 220 MovieClip Frame 2
count = _root["tank_" + _root.na_rade.tank_number].specials[6];
Symbol 224 Button
on (release) {
_root.na_rade.disable_shield();
_parent.refresh();
}
Symbol 225 MovieClip Frame 1
stop();
refresh();
Symbol 226 MovieClip Frame 1
stop();
_parent.sh_active = false;
Symbol 226 MovieClip Frame 2
_parent.sh_active = true;
Instance of Symbol 196 MovieClip in Symbol 226 MovieClip Frame 2
onClipEvent (mouseMove) {
if (((((_x + (_width / 2)) < _xmouse) || (_xmouse < (_x - (_width / 2)))) || ((_y + (_height / 2)) < _ymouse)) || (_ymouse < (_y - (_height / 2)))) {
_parent.gotoAndStop(1);
}
}
Instance of Symbol 203 MovieClip "sh1" in Symbol 226 MovieClip Frame 2
onClipEvent (load) {
function refresh() {
var _local1 = _root;
if ((_local1["tank_" + _local1.na_rade.tank_number].specials[3] > 0) && (_local1.na_rade.sh_active == false)) {
gotoAndStop (1);
} else {
gotoAndStop (3);
}
}
}
Instance of Symbol 207 MovieClip "sh2" in Symbol 226 MovieClip Frame 2
onClipEvent (load) {
function refresh() {
var _local1 = _root;
if ((_local1["tank_" + _local1.na_rade.tank_number].specials[4] > 0) && (_local1.na_rade.sh_active == false)) {
gotoAndStop (1);
} else {
gotoAndStop (3);
}
}
}
Instance of Symbol 214 MovieClip "sh3" in Symbol 226 MovieClip Frame 2
onClipEvent (load) {
function refresh() {
var _local1 = _root;
if ((_local1["tank_" + _local1.na_rade.tank_number].specials[5] > 0) && (_local1.na_rade.sh_active == false)) {
gotoAndStop (1);
} else {
gotoAndStop (3);
}
}
}
Instance of Symbol 220 MovieClip "sh4" in Symbol 226 MovieClip Frame 2
onClipEvent (load) {
function refresh() {
var _local1 = _root;
if ((_local1["tank_" + _local1.na_rade.tank_number].specials[6] > 0) && (_local1.na_rade.sh_active == false)) {
gotoAndStop (1);
} else {
gotoAndStop (3);
}
}
}
Instance of Symbol 225 MovieClip "sh_d" in Symbol 226 MovieClip Frame 2
onClipEvent (load) {
function refresh() {
if (_root.na_rade.sh_active) {
gotoAndStop (1);
} else {
gotoAndStop (2);
}
}
}
Symbol 226 MovieClip Frame 3
stop();
Symbol 227 MovieClip [panel] Frame 1
function player_changed() {
ico.change_icon();
sort_score();
refresh_icons();
}
function refresh_icons() {
repair.refresh();
parachutes.refresh();
teleport.refresh();
shields.refresh();
}
function sort_score() {
var _local1 = _root;
var _local2 = this;
i = 1;
while (i < (_local1.pocet_hracu + 1)) {
_local2["score" + i].score = _local1["tank_" + i].total_score;
i++;
}
i = 1;
while (i < (_local1.pocet_hracu + 1)) {
Set("t" + i, _local1.pocet_hracu);
i++;
}
c = 1;
while (c < (_local1.pocet_hracu + 1)) {
i = 1;
while (i < (_local1.pocet_hracu + 1)) {
if ((_local1["tank_" + c].total_score >= _local1["tank_" + i].total_score) && (c != i)) {
_local2["t" + c] = _local2["t" + c] - 1;
}
i++;
}
c++;
}
p1 = new Object();
p1.total_score = -1E18;
i = 1;
while (i < (_local1.pocet_hracu + 1)) {
if (p1.total_score < _local1["tank_" + i].total_score) {
p1 = _local1["tank_" + i];
_local2["score" + i]._y = 28.3;
}
i++;
}
p2 = new Object();
p2.total_score = -1E19;
i = 1;
while (i < (_local1.pocet_hracu + 1)) {
if ((p2.total_score < _local1["tank_" + i].total_score) && (p1 != _local1["tank_" + i])) {
p2 = _local1["tank_" + i];
_local2["score" + i]._y = 42.45;
}
i++;
}
p3 = new Object();
p3.total_score = -1E19;
i = 1;
while (i < (_local1.pocet_hracu + 1)) {
if (((p3.total_score < _local1["tank_" + i].total_score) && (p1 != _local1["tank_" + i])) && (p2 != _local1["tank_" + i])) {
p3 = _local1["tank_" + i];
_local2["score" + i]._y = 56.6;
}
i++;
}
p4 = new Object();
p4.total_score = -1E19;
i = 1;
while (i < (_local1.pocet_hracu + 1)) {
if ((((p4.total_score < _local1["tank_" + i].total_score) && (p1 != _local1["tank_" + i])) && (p2 != _local1["tank_" + i])) && (p3 != _local1["tank_" + i])) {
p4 = _local1["tank_" + i];
_local2["score" + i]._y = 70.75;
}
i++;
}
p5 = new Object();
p5.total_score = -1E19;
i = 1;
while (i < (_local1.pocet_hracu + 1)) {
if (((((p5.total_score < _local1["tank_" + i].total_score) && (p1 != _local1["tank_" + i])) && (p2 != _local1["tank_" + i])) && (p3 != _local1["tank_" + i])) && (p4 != _local1["tank_" + i])) {
p5 = _local1["tank_" + i];
_local2["score" + i]._y = 84.9;
}
i++;
}
}
cl = new Color(name);
i = 1;
while (i < (_root.pocet_hracu + 1)) {
this.attachMovie("score_tab", "score" + i, 1090000 + i);
this["score" + i]._x = 36;
this["score" + i]._y = (14.15 * i) + 14.15;
this["score" + i].name = _root["tank_" + i].name;
this["score" + i].score = _root["tank_" + i].total_score;
this["col" + i] = new Color(this["score" + i]);
this["col" + i].setRGB(_root["tank_" + i].col);
i++;
}
player_changed();
Instance of Symbol 131 MovieClip "ico" in Symbol 227 MovieClip [panel] Frame 1
onClipEvent (load) {
function view_forward() {
var _local1 = _root;
var _local2 = this;
d = false;
i = _local1["tank_" + _local1.na_rade.tank_number].cur_gun + 1;
while (_local1.weapons.length >= i) {
if (_local1["tank_" + _local1.na_rade.tank_number].guns[i] > 0) {
_local1["tank_" + _local1.na_rade.tank_number].cur_gun = i;
d = true;
_local2.change_icon();
break;
}
i++;
}
if (d == false) {
i = 0;
while (_local1.weapons.length >= i) {
if (_local1["tank_" + _local1.na_rade.tank_number].guns[i] > 0) {
_local1["tank_" + _local1.na_rade.tank_number].cur_gun = i;
_local2.change_icon();
return;
}
i++;
}
}
}
function view_backward() {
var _local1 = _root;
var _local2 = this;
d = false;
i = _local1["tank_" + _local1.na_rade.tank_number].cur_gun - 1;
while (i >= 0) {
if (_local1["tank_" + _local1.na_rade.tank_number].guns[i] > 0) {
_local1["tank_" + _local1.na_rade.tank_number].cur_gun = i;
d = true;
_local2.change_icon();
break;
}
i--;
}
if (d == false) {
i = _local1.weapons.length;
while (i >= 0) {
if (_local1["tank_" + _local1.na_rade.tank_number].guns[i] > 0) {
_local1["tank_" + _local1.na_rade.tank_number].cur_gun = i;
_local2.change_icon();
return;
}
i--;
}
}
}
}
Instance of Symbol 140 MovieClip "pow" in Symbol 227 MovieClip [panel] Frame 1
onClipEvent (load) {
sdrag = false;
}
onClipEvent (enterFrame) {
if (sdrag) {
_root.na_rade.power = 100 - Math.round(pow._y);
if (pow._y < 0) {
pow._y = 0;
}
} else {
pow._y = 100 - _root.na_rade.power;
}
shadow._y = -_root["tank_" + _root.na_rade.tank_number].energy;
}
Instance of Symbol 144 MovieClip "fuel_ar" in Symbol 227 MovieClip [panel] Frame 1
onClipEvent (enterFrame) {
if (_root.na_rade.type == "tank") {
if (left) {
_root.na_rade.move_left();
} else if (right) {
_root.na_rade.move_right();
}
if (_root["tank_" + _root.na_rade.tank_number].fuel == 0) {
left = false;
right = false;
}
}
}
Instance of Symbol 150 MovieClip in Symbol 227 MovieClip [panel] Frame 1
onClipEvent (enterFrame) {
if (sdrag) {
_root.na_rade.rotace = 90 + Math.round(drag._x);
_root.tur.play();
} else {
drag._x = -90 + _root.na_rade.rotace;
_root.tur.gotoAndStop(2);
}
}
Instance of Symbol 157 MovieClip "rad1" in Symbol 227 MovieClip [panel] Frame 1
onClipEvent (load) {
if (_quality == "HIGH") {
gotoAndStop (2);
} else if (_quality == "MEDIUM") {
_parent.rad2.gotoAndStop(2);
} else if (_quality == "LOW") {
_parent.rad3.gotoAndStop(2);
}
}
Instance of Symbol 174 MovieClip "repair" in Symbol 227 MovieClip [panel] Frame 1
onClipEvent (load) {
function refresh() {
var _local1 = _root;
if (((_local1["tank_" + _local1.na_rade.tank_number].energy < _local1["tank_" + _local1.na_rade.tank_number].max_energy) && (_local1["tank_" + _local1.na_rade.tank_number].specials[1] > 0)) && (_local1.na_rade.type == "tank")) {
gotoAndStop (1);
} else {
gotoAndStop (2);
}
count = _local1["tank_" + _local1.na_rade.tank_number].specials[1];
}
}
Instance of Symbol 183 MovieClip "parachutes" in Symbol 227 MovieClip [panel] Frame 1
onClipEvent (load) {
function refresh() {
var _local1 = _root;
count = _local1["tank_" + _local1.na_rade.tank_number].specials[0];
if (((count == 0) && (_local1.na_rade.par_used == false)) || (_local1.na_rade.type == "ai")) {
gotoAndStop (3);
} else if (_local1.na_rade.par) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
}
Instance of Symbol 190 MovieClip "teleport" in Symbol 227 MovieClip [panel] Frame 1
onClipEvent (load) {
function refresh() {
var _local1 = _root;
count = _local1["tank_" + _local1.na_rade.tank_number].specials[7];
if ((count > 0) && (_local1.na_rade.type == "tank")) {
gotoAndStop (1);
} else {
gotoAndStop (2);
}
}
}
Instance of Symbol 226 MovieClip "shields" in Symbol 227 MovieClip [panel] Frame 1
onClipEvent (load) {
function refresh() {
if (_root.na_rade.type == "tank") {
sh1.refresh();
sh2.refresh();
sh3.refresh();
sh4.refresh();
sh_d.refresh();
} else {
gotoAndStop (3);
}
}
}
Symbol 227 MovieClip [panel] Frame 2
if (sh_active) {
fuel_ar.gotoAndStop(2);
} else {
fuel_ar.gotoAndStop(1);
}
num = _root.na_rade.tank_number;
cl.setRGB(_root["tank_" + num].col);
power = _root.power;
rotation = _root.rotace;
energy = Math.round(_root["tank_" + num].energy);
fuel = Math.round(_root["tank_" + num].fuel);
kills = _root["tank_" + num].kills;
name.name = _root["tank_" + num].name;
score = _root["tank_" + num].score;
vitr = Math.abs(_root.vitr);
vitr_uk._xscale = _root.vitr;
tank.hlaven._rotation = _root.na_rade.rotace;
Symbol 227 MovieClip [panel] Frame 3
gotoAndPlay (2);
Symbol 235 MovieClip Frame 1
this._x = this._x + (_root.vitr / 80);
if (this._x > 360) {
this._x = -360;
}
if (this._x < -360) {
this._x = 360;
}
Symbol 235 MovieClip Frame 2
gotoAndPlay (1);
Instance of Symbol 235 MovieClip in Symbol 242 MovieClip [krajina3] Frame 1
onClipEvent (enterFrame) {
this._x = this._x + 0.2;
if (this._x > 460) {
this._x = -60;
}
}
Instance of Symbol 235 MovieClip in Symbol 242 MovieClip [krajina3] Frame 1
onClipEvent (enterFrame) {
this._x = this._x + 0.2;
if (this._x > 460) {
this._x = -60;
}
}
Symbol 249 MovieClip Frame 1
this._x = this._x + (_root.vitr / 80);
if (this._x > 360) {
this._x = -360;
}
if (this._x < -360) {
this._x = 360;
}
Symbol 249 MovieClip Frame 2
gotoAndPlay (1);
Symbol 258 MovieClip Frame 1
function bum() {
var _local1 = _root;
var _local2 = _parent;
par1 = 15;
par2 = 7.5;
par3 = 15;
i = 0;
while (i < _width) {
cur = _local1["land" + Math.round((_local2._x - (_width / 2)) + i)];
xx = _local2._x;
yy = _local2._y;
x = cur._x;
y = cur._y;
h = cur._y - (cur._height / 2);
if (hitTest(x, h, true)) {
vzr = Math.cos(0.017 * (Math.sqrt(((xx - x) * (xx - x)) + ((yy - h) * (yy - h))) * (180 / _width)));
cur._height = cur._height - (par1 * vzr);
cur._y = cur._y + (par2 * vzr);
} else if (hitTest(_local1["land" + Math.round((xx - (_width / 2)) + i)])) {
cur._height = cur._height - (par3 * Math.cos(0.017 * (Math.abs(xx - x) * (180 / _width))));
cur._y = cur._y + ((par3 * Math.cos(0.017 * (Math.abs(xx - x) * (180 / _width)))) / 2);
}
i++;
}
par4 = 5;
par5 = 13;
owner.last_shot_x = _local2._x;
owner.last_shot_y = _local2._y;
owner.last_shot_out = false;
i = 1;
while (_local1.pocet_hracu >= i) {
current = _local1["tank" + i];
if (hitTest(current) || (hitTest(_local1["shield" + i]))) {
x = _local2._x - current._x;
y = _local2._y - current._y;
vzd = Math.sqrt((x * x) + (y * y));
if (!current.sh_active) {
damg = Math.round(_width / ((vzd + 1) / par4));
if (_local1["tank_" + i].energy < damg) {
damg = _local1["tank_" + i].energy;
}
} else {
damg = Math.round(_width / (((vzd / 2) + 1) / par5));
}
current.damage(damg, owner);
}
i++;
}
}
stop();
Symbol 258 MovieClip Frame 6
bum();
f._rotation = f._rotation - _parent._rotation;
Symbol 258 MovieClip Frame 12
_root.shot_flying = false;
_root.test();
_parent.removeMovieClip();
Instance of Symbol 258 MovieClip "strela" in Symbol 259 MovieClip [bmissile_g] Frame 1
onClipEvent (load) {
stop();
depth = 10040;
uhel = (-_parent._rotation) + 90;
g = 9.81;
t = 0;
x = _parent._x;
hit = true;
y = _parent._y;
vox = Math.cos(0.01745329 * uhel) * vo;
voy = Math.sin(0.017 * uhel) * vo;
_root.shot_flying = true;
}
onClipEvent (enterFrame) {
if (((_parent._x < 0) || (_parent._x > 550)) || (_y > 400)) {
_root.shot_flying = false;
owner.last_shot_x = _parent._x;
owner.last_shot_y = _parent._y;
owner.last_shot_out = true;
_root.test();
_parent.removeMovieClip();
}
if (_currentframe == 1) {
_parent._x = x + (vox * t);
_parent._y = (y - (voy * t)) + ((g / 2) * (t * t));
vox = vox + (_root.vitr / 600);
}
if (hitTest(_root["land" + Math.round(_parent._x)])) {
play();
}
i = 1;
while (_root.pocet_hracu >= i) {
if (hitTest(_root["t" + i]) && (i != owner.tank_number)) {
play();
}
if ((hitTest(owner) || (hitTest(_root["shield" + owner.tank_number]))) && (hit == false)) {
play();
}
i++;
}
if ((!hitTest(owner)) && (hit)) {
_parent.swapDepths(depth);
}
if (((!hitTest(owner)) && (hitTest(_root["shield" + owner.tank_number]) == false)) && (hit == true)) {
hit = false;
}
t = t + 0.1;
}
Symbol 260 MovieClip Frame 1
function bum() {
var _local1 = _root;
var _local2 = _parent;
par1 = 15;
par2 = 7.5;
par3 = 15;
i = 0;
while (i < _width) {
cur = _local1["land" + Math.round((_local2._x - (_width / 2)) + i)];
xx = _local2._x;
yy = _local2._y;
x = cur._x;
y = cur._y;
h = cur._y - (cur._height / 2);
if (hitTest(x, h, true)) {
vzr = Math.cos(0.017 * (Math.sqrt(((xx - x) * (xx - x)) + ((yy - h) * (yy - h))) * (180 / _width)));
cur._height = cur._height - (par1 * vzr);
cur._y = cur._y + (par2 * vzr);
} else if (hitTest(_local1["land" + Math.round((xx - (_width / 2)) + i)])) {
cur._height = cur._height - (par3 * Math.cos(0.017 * (Math.abs(xx - x) * (180 / _width))));
cur._y = cur._y + ((par3 * Math.cos(0.017 * (Math.abs(xx - x) * (180 / _width)))) / 2);
}
i++;
}
par4 = 13;
par5 = 18;
owner.last_shot_x = _local2._x;
owner.last_shot_y = _local2._y;
owner.last_shot_out = false;
i = 1;
while (_local1.pocet_hracu >= i) {
current = _local1["tank" + i];
if (hitTest(current) || (hitTest(_local1["shield" + i]))) {
x = _local2._x - current._x;
y = _local2._y - current._y;
vzd = Math.sqrt((x * x) + (y * y));
if (!current.sh_active) {
damg = Math.round(_width / ((vzd + 1) / par4));
if (_local1["tank_" + i].energy < damg) {
damg = _local1["tank_" + i].energy;
}
} else {
damg = Math.round(_width / (((vzd / 2) + 1) / par5));
}
current.damage(damg, owner);
}
i++;
}
}
stop();
Symbol 260 MovieClip Frame 6
bum();
f._rotation = f._rotation - _parent._rotation;
Symbol 260 MovieClip Frame 12
_root.test();
_parent.removeMovieClip();
Instance of Symbol 260 MovieClip "strela" in Symbol 261 MovieClip [missile_g] Frame 1
onClipEvent (load) {
stop();
depth = 10040;
uhel = (-_parent._rotation) + 90;
g = 9.81;
t = 0;
x = _parent._x;
hit = true;
y = _parent._y;
vox = Math.cos(0.01745329 * uhel) * vo;
voy = Math.sin(0.017 * uhel) * vo;
_root.shot_flying = true;
}
onClipEvent (enterFrame) {
if (((_parent._x < 0) || (_parent._x > 550)) || (_y > 400)) {
_root.shot_flying = false;
owner.last_shot_x = _parent._x;
owner.last_shot_y = _parent._y;
owner.last_shot_out = true;
_root.test();
_parent.removeMovieClip();
}
if (_currentframe == 1) {
_parent._x = x + (vox * t);
_parent._y = (y - (voy * t)) + ((g / 2) * (t * t));
vox = vox + (_root.vitr / 600);
}
if (hitTest(_root["land" + Math.round(_parent._x)])) {
play();
}
i = 1;
while (_root.pocet_hracu >= i) {
if (hitTest(_root["t" + i]) && (i != owner.tank_number)) {
play();
}
if ((hitTest(owner) || (hitTest(_root["shield" + owner.tank_number]))) && (hit == false)) {
play();
}
i++;
}
if ((!hitTest(owner)) && (hit)) {
_parent.swapDepths(depth);
}
if (((!hitTest(owner)) && (hitTest(_root["shield" + owner.tank_number]) == false)) && (hit == true)) {
hit = false;
}
t = t + 0.1;
}
Symbol 263 MovieClip Frame 1
stop();
Symbol 263 MovieClip Frame 2
test_ = true;
i = 0;
while (i < 5) {
if (this["shot" + i] != true) {
test_ = false;
break;
}
i++;
}
if (test_) {
gotoAndStop (4);
}
Symbol 263 MovieClip Frame 3
gotoAndPlay(_currentframe - 1);
Symbol 263 MovieClip Frame 4
_root.shot_flying = false;
_root.test();
_parent.removeMovieClip();
Instance of Symbol 263 MovieClip "strela" in Symbol 264 MovieClip [astrike_g] Frame 1
onClipEvent (load) {
f = false;
_root[_root.na_rade._name + "_hlaven"].gotoAndStop(1);
stop();
Mouse.hide();
_root.attachMovie("astrikecur", "cursor", 1100000);
startDrag (_root.cursor, true);
uhel = 0;
}
onClipEvent (mouseUp) {
if (!f) {
f = true;
stopDrag();
_root.cursor._x = -20;
Mouse.show();
x = _root._xmouse;
i = 0;
while (i < 5) {
_root.attachMovie("amissile", "strela" + i, 1001 + i);
_root["strela" + i].strela.num = i;
_root["strela" + i].strela.x = x;
_root["strela" + i].strela.uhel = uhel;
_root["strela" + i].strela.owner = owner;
i++;
}
gotoAndPlay (2);
}
}
onClipEvent (keyDown) {
if (Key.getCode() == 37) {
uhel = 0;
_root.cursor._xscale = 100;
} else if (Key.getCode() == 39) {
uhel = 180;
_root.cursor._xscale = -100;
}
}
Symbol 265 MovieClip Frame 1
function bum() {
var _local1 = _root;
var _local2 = _parent;
par1 = 15;
par2 = 7.5;
par3 = 15;
i = 0;
while (i < _width) {
cur = _local1["land" + Math.round((_local2._x - (_width / 2)) + i)];
xx = _local2._x;
yy = _local2._y;
x = cur._x;
y = cur._y;
h = cur._y - (cur._height / 2);
if (hitTest(x, h, true)) {
vzr = Math.cos(0.017 * (Math.sqrt(((xx - x) * (xx - x)) + ((yy - h) * (yy - h))) * (180 / _width)));
cur._height = cur._height - (par1 * vzr);
cur._y = cur._y + (par2 * vzr);
} else if (hitTest(_local1["land" + Math.round((xx - (_width / 2)) + i)])) {
cur._height = cur._height - (par3 * Math.cos(0.017 * (Math.abs(xx - x) * (180 / _width))));
cur._y = cur._y + ((par3 * Math.cos(0.017 * (Math.abs(xx - x) * (180 / _width)))) / 2);
}
i++;
}
par4 = 13;
par5 = 20;
owner.last_shot_x = _local2._x;
owner.last_shot_y = _local2._y;
owner.last_shot_out = false;
i = 1;
while (_local1.pocet_hracu >= i) {
current = _local1["tank" + i];
if (hitTest(current) || (hitTest(_local1["shield" + i]))) {
x = _local2._x - current._x;
y = _local2._y - current._y;
vzd = Math.sqrt((x * x) + (y * y));
if (!current.sh_active) {
damg = Math.round(_width / ((vzd + 1) / par4));
if (_local1["tank_" + i].energy < damg) {
damg = _local1["tank_" + i].energy;
}
} else {
damg = Math.round(_width / (((vzd / 2) + 1) / par5));
}
current.damage(damg, owner);
}
i++;
}
}
stop();
Symbol 265 MovieClip Frame 6
bum();
f._rotation = f._rotation - _parent._rotation;
Symbol 265 MovieClip Frame 12
_root.test();
_parent.removeMovieClip();
Instance of Symbol 265 MovieClip "strela" in Symbol 266 MovieClip [broller_g] Frame 1
onClipEvent (load) {
stop();
first = true;
second = false;
start = true;
depth = 10040;
uhel = (-_parent._rotation) + 90;
g = 9.81;
t = 0;
x = _parent._x;
hit = true;
y = _parent._y;
vox = Math.cos(0.01745329 * uhel) * vo;
voy = Math.sin(0.017 * uhel) * vo;
_root.shot_flying = true;
}
onClipEvent (enterFrame) {
if (((_parent._x < 0) || (_parent._x > 550)) || (_parent._y > 400)) {
_root.shot_flying = false;
_root.test();
_parent.removeMovieClip();
}
i = 1;
while (_root.pocet_hracu >= i) {
if (hitTest(_root["t" + i]) && (i != owner.tank_number)) {
play();
first = false;
second = false;
}
if ((hitTest(owner) || (hitTest(_root["shield" + owner.tank_number]))) && (hit == false)) {
play();
first = false;
second = false;
}
i++;
}
if ((!hitTest(owner)) && (hitTest(_root["shield" + owner.tank_number]) == false)) {
hit = false;
}
if (first) {
_parent._x = x + (vox * t);
_parent._y = (y - (voy * t)) + ((g / 2) * (t * t));
vox = vox + (_root.vitr / 600);
if (hitTest(_root["land" + Math.round(_parent._x)])) {
first = false;
second = true;
}
t = t + 0.1;
}
if (second) {
lastx = Math.round(_parent._x);
if (start) {
cur = _root["land" + Math.round(_parent._x)];
cury = cur._y - (cur._height / 2);
_parent._y = cury;
curl = _root["land" + (Math.round(_parent._x) - 1)];
curly = curl._y - (curl._height / 2);
curp = _root["land" + (Math.round(_parent._x) + 1)];
curpy = curp._y - (curp._height / 2);
if ((curly >= cury) || (curpy >= cury)) {
if (curly >= cury) {
smer = "left";
} else if (curpy >= cury) {
smer = "right";
}
} else {
second = false;
play();
}
start = false;
}
if (smer == "left") {
cur = _root["land" + Math.round(_parent._x)];
cury = cur._y - (cur._height / 2);
_parent._y = cury;
curl = _root["land" + (Math.round(_parent._x) - 1)];
curly = curl._y - (curl._height / 2);
if (curly >= cury) {
_parent._x = _parent._x - 1;
} else {
second = false;
play();
}
} else if (smer == "right") {
cur = _root["land" + Math.round(_parent._x)];
cury = cur._y - (cur._height / 2);
_parent._y = cury;
curp = _root["land" + (Math.round(_parent._x) + 1)];
curpy = curp._y - (curp._height / 2);
if (curpy >= cury) {
_parent._x = _parent._x + 1;
} else {
second = false;
play();
}
}
if (Math.round(lastx) == Math.round(_parent._x)) {
if (owner._x < _parent._x) {
smer = right;
} else {
smer = left;
}
}
}
}
Instance of Symbol 265 MovieClip "strela" in Symbol 267 MovieClip [broller2_g] Frame 1
onClipEvent (load) {
stop();
first = true;
second = false;
start = true;
depth = 10040;
uhel = (-_parent._rotation) + 90;
g = 9.81;
t = 0;
x = _parent._x;
hit = true;
y = _parent._y;
vox = Math.cos(0.01745329 * uhel) * vo;
voy = Math.sin(0.017 * uhel) * vo;
_root.shot_flying = true;
}
onClipEvent (enterFrame) {
if (((_parent._x < 0) || (_parent._x > 550)) || (_parent._y > 400)) {
_root.shot_flying = false;
_root.test();
_parent.removeMovieClip();
}
i = 1;
while (_root.pocet_hracu >= i) {
if (hitTest(_root["t" + i]) && (i != owner.tank_number)) {
play();
first = false;
second = false;
}
if ((hitTest(owner) || (hitTest(_root["shield" + owner.tank_number]))) && (hit == false)) {
play();
first = false;
second = false;
}
i++;
}
if ((!hitTest(owner)) && (hitTest(_root["shield" + owner.tank_number]) == false)) {
hit = false;
}
if (first) {
_parent._x = x + (vox * t);
_parent._y = (y - (voy * t)) + ((g / 2) * (t * t));
vox = vox + (_root.vitr / 600);
if (hitTest(_root["land" + Math.round(_parent._x)])) {
first = false;
second = true;
}
t = t + 0.1;
}
if (second) {
lastx = Math.round(_parent._x);
if (start) {
cur = _root["land" + Math.round(_parent._x)];
cury = cur._y - (cur._height / 2);
_parent._y = cury;
curl = _root["land" + (Math.round(_parent._x) - 1)];
curly = curl._y - (curl._height / 2);
curp = _root["land" + (Math.round(_parent._x) + 1)];
curpy = curp._y - (curp._height / 2);
if ((cury >= curly) || (cury >= curpy)) {
if (curly >= cury) {
smer = "right";
} else if (curpy >= cury) {
smer = "left";
}
} else {
second = false;
play();
}
start = false;
}
if (smer == "left") {
cur = _root["land" + Math.round(_parent._x)];
cury = cur._y - (cur._height / 2);
_parent._y = cury;
curl = _root["land" + (Math.round(_parent._x) - 1)];
curly = curl._y - (curl._height / 2);
if (cury >= curly) {
_parent._x = _parent._x - 1;
} else {
second = false;
play();
}
} else if (smer == "right") {
cur = _root["land" + Math.round(_parent._x)];
cury = cur._y - (cur._height / 2);
_parent._y = cury;
curp = _root["land" + (Math.round(_parent._x) + 1)];
curpy = curp._y - (curp._height / 2);
if (cury >= curpy) {
_parent._x = _parent._x + 1;
} else {
second = false;
play();
}
}
if (Math.round(lastx) == Math.round(_parent._x)) {
if (owner._x < _parent._x) {
smer = "right";
} else {
smer = "left";
}
}
}
}
Symbol 268 MovieClip Frame 1
function bum() {
var _local1 = _root;
var _local2 = _parent;
par1 = 30;
par2 = 15;
par3 = 15;
i = 0;
while (i < _width) {
cur = _local1["land" + Math.round((_local2._x - (_width / 2)) + i)];
xx = _local2._x;
yy = _local2._y;
x = cur._x;
y = cur._y;
h = cur._y - (cur._height / 2);
if (hitTest(x, h, true)) {
vzr = Math.cos(0.017 * (Math.sqrt(((xx - x) * (xx - x)) + ((yy - h) * (yy - h))) * (180 / _width)));
cur._height = cur._height - (par1 * vzr);
cur._y = cur._y + (par2 * vzr);
} else if (hitTest(_local1["land" + Math.round((xx - (_width / 2)) + i)])) {
cur._height = cur._height - (par3 * Math.cos(0.017 * (Math.abs(xx - x) * (180 / _width))));
cur._y = cur._y + ((par3 * Math.cos(0.017 * (Math.abs(xx - x) * (180 / _width)))) / 2);
}
i++;
}
par4 = 13;
par5 = 18;
owner.last_shot_x = _local2._x;
owner.last_shot_y = _local2._y;
owner.last_shot_out = false;
i = 1;
while (_local1.pocet_hracu >= i) {
current = _local1["tank" + i];
if (hitTest(current) || (hitTest(_local1["shield" + i]))) {
x = _local2._x - current._x;
y = _local2._y - current._y;
vzd = Math.sqrt((x * x) + (y * y));
if (!current.sh_active) {
damg = Math.round(_width / ((vzd + 1) / par4));
if (_local1["tank_" + i].energy < damg) {
damg = _local1["tank_" + i].energy;
}
} else {
damg = Math.round(_width / (((vzd / 2) + 1) / par5));
}
current.damage(damg, owner);
}
i++;
}
}
stop();
Symbol 268 MovieClip Frame 6
bum();
f._rotation = f._rotation - _parent._rotation;
Symbol 268 MovieClip Frame 12
_root.test();
_parent.removeMovieClip();
Instance of Symbol 268 MovieClip "strela" in Symbol 269 MovieClip [roller_g] Frame 1
onClipEvent (load) {
stop();
first = true;
second = false;
start = true;
depth = 10040;
uhel = (-_parent._rotation) + 90;
g = 9.81;
t = 0;
x = _parent._x;
hit = true;
y = _parent._y;
vox = Math.cos(0.01745329 * uhel) * vo;
voy = Math.sin(0.017 * uhel) * vo;
_root.shot_flying = true;
}
onClipEvent (enterFrame) {
if (((_parent._x < 0) || (_parent._x > 550)) || (_parent._y > 400)) {
_root.shot_flying = false;
_root.test();
_parent.removeMovieClip();
}
i = 1;
while (_root.pocet_hracu >= i) {
if (hitTest(_root["t" + i]) && (i != owner.tank_number)) {
play();
first = false;
second = false;
}
if ((hitTest(owner) || (hitTest(_root["shield" + owner.tank_number]))) && (hit == false)) {
play();
first = false;
second = false;
}
i++;
}
if ((!hitTest(owner)) && (hitTest(_root["shield" + owner.tank_number]) == false)) {
hit = false;
}
if (first) {
_parent._x = x + (vox * t);
_parent._y = (y - (voy * t)) + ((g / 2) * (t * t));
vox = vox + (_root.vitr / 600);
if (hitTest(_root["land" + Math.round(_parent._x)])) {
first = false;
second = true;
}
t = t + 0.1;
}
if (second) {
lastx = Math.round(_parent._x);
if (start) {
cur = _root["land" + Math.round(_parent._x)];
cury = cur._y - (cur._height / 2);
_parent._y = cury;
curl = _root["land" + (Math.round(_parent._x) - 1)];
curly = curl._y - (curl._height / 2);
curp = _root["land" + (Math.round(_parent._x) + 1)];
curpy = curp._y - (curp._height / 2);
if ((curly >= cury) || (curpy >= cury)) {
if (curly >= cury) {
smer = "left";
} else if (curpy >= cury) {
smer = "right";
}
} else {
second = false;
play();
}
start = false;
}
if (smer == "left") {
cur = _root["land" + Math.round(_parent._x)];
cury = cur._y - (cur._height / 2);
_parent._y = cury;
curl = _root["land" + (Math.round(_parent._x) - 1)];
curly = curl._y - (curl._height / 2);
if (curly >= cury) {
_parent._x = _parent._x - 1;
} else {
second = false;
play();
}
} else if (smer == "right") {
cur = _root["land" + Math.round(_parent._x)];
cury = cur._y - (cur._height / 2);
_parent._y = cury;
curp = _root["land" + (Math.round(_parent._x) + 1)];
curpy = curp._y - (curp._height / 2);
if (curpy >= cury) {
_parent._x = _parent._x + 1;
} else {
second = false;
play();
}
}
if (Math.round(lastx) == Math.round(_parent._x)) {
if (owner._x < _parent._x) {
smer = right;
} else {
smer = left;
}
}
}
}
Instance of Symbol 268 MovieClip "strela" in Symbol 270 MovieClip [roller2_g] Frame 1
onClipEvent (load) {
stop();
first = true;
second = false;
start = true;
depth = 10040;
uhel = (-_parent._rotation) + 90;
g = 9.81;
t = 0;
x = _parent._x;
hit = true;
y = _parent._y;
vox = Math.cos(0.01745329 * uhel) * vo;
voy = Math.sin(0.017 * uhel) * vo;
_root.shot_flying = true;
}
onClipEvent (enterFrame) {
if (((_parent._x < 0) || (_parent._x > 550)) || (_parent._y > 400)) {
_root.shot_flying = false;
_root.test();
_parent.removeMovieClip();
}
i = 1;
while (_root.pocet_hracu >= i) {
if (hitTest(_root["t" + i]) && (i != owner.tank_number)) {
play();
first = false;
second = false;
}
if ((hitTest(owner) || (hitTest(_root["shield" + owner.tank_number]))) && (hit == false)) {
play();
first = false;
second = false;
}
i++;
}
if ((!hitTest(owner)) && (hitTest(_root["shield" + owner.tank_number]) == false)) {
hit = false;
}
if (first) {
_parent._x = x + (vox * t);
_parent._y = (y - (voy * t)) + ((g / 2) * (t * t));
vox = vox + (_root.vitr / 600);
if (hitTest(_root["land" + Math.round(_parent._x)])) {
first = false;
second = true;
}
t = t + 0.1;
}
if (second) {
lastx = Math.round(_parent._x);
if (start) {
cur = _root["land" + Math.round(_parent._x)];
cury = cur._y - (cur._height / 2);
_parent._y = cury;
curl = _root["land" + (Math.round(_parent._x) - 1)];
curly = curl._y - (curl._height / 2);
curp = _root["land" + (Math.round(_parent._x) + 1)];
curpy = curp._y - (curp._height / 2);
if ((cury >= curly) || (cury >= curpy)) {
if (curly >= cury) {
smer = "right";
} else if (curpy >= cury) {
smer = "left";
}
} else {
second = false;
play();
}
start = false;
}
if (smer == "left") {
cur = _root["land" + Math.round(_parent._x)];
cury = cur._y - (cur._height / 2);
_parent._y = cury;
curl = _root["land" + (Math.round(_parent._x) - 1)];
curly = curl._y - (curl._height / 2);
if (cury >= curly) {
_parent._x = _parent._x - 1;
} else {
second = false;
play();
}
} else if (smer == "right") {
cur = _root["land" + Math.round(_parent._x)];
cury = cur._y - (cur._height / 2);
_parent._y = cury;
curp = _root["land" + (Math.round(_parent._x) + 1)];
curpy = curp._y - (curp._height / 2);
if (cury >= curpy) {
_parent._x = _parent._x + 1;
} else {
second = false;
play();
}
}
if (Math.round(lastx) == Math.round(_parent._x)) {
if (owner._x < _parent._x) {
smer = "right";
} else {
smer = "left";
}
}
}
}
Symbol 271 MovieClip Frame 1
function bum() {
var _local1 = _root;
var _local2 = _parent;
par1 = 35;
par2 = 30;
par3 = 30;
i = 0;
while (i < _width) {
cur = _local1["land" + Math.round((_local2._x - (_width / 2)) + i)];
xx = _local2._x;
yy = _local2._y;
x = cur._x;
y = cur._y;
h = cur._y - (cur._height / 2);
if (hitTest(x, h, true)) {
vzr = Math.cos(0.017 * (Math.sqrt(((xx - x) * (xx - x)) + ((yy - h) * (yy - h))) * (180 / _width)));
cur._height = cur._height - (par1 * vzr);
cur._y = cur._y + (par2 * vzr);
} else if (hitTest(_local1["land" + Math.round((xx - (_width / 2)) + i)])) {
cur._height = cur._height - (par3 * Math.cos(0.017 * (Math.abs(xx - x) * (180 / _width))));
cur._y = cur._y + ((par3 * Math.cos(0.017 * (Math.abs(xx - x) * (180 / _width)))) / 2);
}
i++;
}
par4 = 19;
par5 = 36;
owner.last_shot_x = _local2._x;
owner.last_shot_y = _local2._y;
owner.last_shot_out = false;
i = 1;
while (_local1.pocet_hracu >= i) {
current = _local1["tank" + i];
if (hitTest(current) || (hitTest(_local1["shield" + i]))) {
x = _local2._x - current._x;
y = _local2._y - current._y;
vzd = Math.sqrt((x * x) + (y * y));
if (!current.sh_active) {
damg = Math.round(_width / ((vzd + 1) / par4));
if (_local1["tank_" + i].energy < damg) {
damg = _local1["tank_" + i].energy;
}
} else {
damg = Math.round(_width / (((vzd / 2) + 1) / par5));
}
current.damage(damg, owner);
}
i++;
}
}
stop();
Symbol 271 MovieClip Frame 6
bum();
f._rotation = f._rotation - _parent._rotation;
Symbol 271 MovieClip Frame 12
_root.test();
_parent.removeMovieClip();
Instance of Symbol 271 MovieClip "strela" in Symbol 272 MovieClip [hroller_g] Frame 1
onClipEvent (load) {
stop();
first = true;
second = false;
start = true;
depth = 10040;
uhel = (-_parent._rotation) + 90;
g = 9.81;
t = 0;
x = _parent._x;
hit = true;
y = _parent._y;
vox = Math.cos(0.01745329 * uhel) * vo;
voy = Math.sin(0.017 * uhel) * vo;
_root.shot_flying = true;
}
onClipEvent (enterFrame) {
if (((_parent._x < 0) || (_parent._x > 550)) || (_parent._y > 400)) {
_root.shot_flying = false;
_root.test();
_parent.removeMovieClip();
}
i = 1;
while (_root.pocet_hracu >= i) {
if (hitTest(_root["t" + i]) && (i != owner.tank_number)) {
play();
first = false;
second = false;
}
if ((hitTest(owner) || (hitTest(_root["shield" + owner.tank_number]))) && (hit == false)) {
play();
first = false;
second = false;
}
i++;
}
if ((!hitTest(owner)) && (hitTest(_root["shield" + owner.tank_number]) == false)) {
hit = false;
}
if (first) {
_parent._x = x + (vox * t);
_parent._y = (y - (voy * t)) + ((g / 2) * (t * t));
vox = vox + (_root.vitr / 600);
if (hitTest(_root["land" + Math.round(_parent._x)])) {
first = false;
second = true;
}
t = t + 0.1;
}
if (second) {
lastx = Math.round(_parent._x);
if (start) {
cur = _root["land" + Math.round(_parent._x)];
cury = cur._y - (cur._height / 2);
_parent._y = cury;
curl = _root["land" + (Math.round(_parent._x) - 1)];
curly = curl._y - (curl._height / 2);
curp = _root["land" + (Math.round(_parent._x) + 1)];
curpy = curp._y - (curp._height / 2);
if ((curly >= cury) || (curpy >= cury)) {
if (curly >= cury) {
smer = "left";
} else if (curpy >= cury) {
smer = "right";
}
} else {
second = false;
play();
}
start = false;
}
if (smer == "left") {
cur = _root["land" + Math.round(_parent._x)];
cury = cur._y - (cur._height / 2);
_parent._y = cury;
curl = _root["land" + (Math.round(_parent._x) - 1)];
curly = curl._y - (curl._height / 2);
if (curly >= cury) {
_parent._x = _parent._x - 1;
} else {
second = false;
play();
}
} else if (smer == "right") {
cur = _root["land" + Math.round(_parent._x)];
cury = cur._y - (cur._height / 2);
_parent._y = cury;
curp = _root["land" + (Math.round(_parent._x) + 1)];
curpy = curp._y - (curp._height / 2);
if (curpy >= cury) {
_parent._x = _parent._x + 1;
} else {
second = false;
play();
}
}
if (Math.round(lastx) == Math.round(_parent._x)) {
if (owner._x < _parent._x) {
smer = right;
} else {
smer = left;
}
}
}
}
Instance of Symbol 271 MovieClip "strela" in Symbol 273 MovieClip [hroller2_g] Frame 1
onClipEvent (load) {
stop();
first = true;
second = false;
start = true;
depth = 10040;
uhel = (-_parent._rotation) + 90;
g = 9.81;
t = 0;
x = _parent._x;
hit = true;
y = _parent._y;
vox = Math.cos(0.01745329 * uhel) * vo;
voy = Math.sin(0.017 * uhel) * vo;
_root.shot_flying = true;
}
onClipEvent (enterFrame) {
if (((_parent._x < 0) || (_parent._x > 550)) || (_parent._y > 400)) {
_root.shot_flying = false;
_root.test();
_parent.removeMovieClip();
}
i = 1;
while (_root.pocet_hracu >= i) {
if (hitTest(_root["t" + i]) && (i != owner.tank_number)) {
play();
first = false;
second = false;
}
if ((hitTest(owner) || (hitTest(_root["shield" + owner.tank_number]))) && (hit == false)) {
play();
first = false;
second = false;
}
i++;
}
if ((!hitTest(owner)) && (hitTest(_root["shield" + owner.tank_number]) == false)) {
hit = false;
}
if (first) {
_parent._x = x + (vox * t);
_parent._y = (y - (voy * t)) + ((g / 2) * (t * t));
vox = vox + (_root.vitr / 600);
if (hitTest(_root["land" + Math.round(_parent._x)])) {
first = false;
second = true;
}
t = t + 0.1;
}
if (second) {
lastx = Math.round(_parent._x);
if (start) {
cur = _root["land" + Math.round(_parent._x)];
cury = cur._y - (cur._height / 2);
_parent._y = cury;
curl = _root["land" + (Math.round(_parent._x) - 1)];
curly = curl._y - (curl._height / 2);
curp = _root["land" + (Math.round(_parent._x) + 1)];
curpy = curp._y - (curp._height / 2);
if ((cury >= curly) || (cury >= curpy)) {
if (curly >= cury) {
smer = "right";
} else if (curpy >= cury) {
smer = "left";
}
} else {
second = false;
play();
}
start = false;
}
if (smer == "left") {
cur = _root["land" + Math.round(_parent._x)];
cury = cur._y - (cur._height / 2);
_parent._y = cury;
curl = _root["land" + (Math.round(_parent._x) - 1)];
curly = curl._y - (curl._height / 2);
if (cury >= curly) {
_parent._x = _parent._x - 1;
} else {
second = false;
play();
}
} else if (smer == "right") {
cur = _root["land" + Math.round(_parent._x)];
cury = cur._y - (cur._height / 2);
_parent._y = cury;
curp = _root["land" + (Math.round(_parent._x) + 1)];
curpy = curp._y - (curp._height / 2);
if (cury >= curpy) {
_parent._x = _parent._x + 1;
} else {
second = false;
play();
}
}
if (Math.round(lastx) == Math.round(_parent._x)) {
if (owner._x < _parent._x) {
smer = "right";
} else {
smer = "left";
}
}
}
}
Symbol 274 MovieClip Frame 1
function bum() {
var _local1 = _root;
var _local2 = _parent;
par1 = 15;
par2 = 7.5;
par3 = 15;
i = 0;
while (i < _width) {
cur = _local1["land" + Math.round((_local2._x - (_width / 2)) + i)];
xx = _local2._x;
yy = _local2._y;
x = cur._x;
y = cur._y;
h = cur._y - (cur._height / 2);
if (hitTest(x, h, true)) {
vzr = Math.cos(0.017 * (Math.sqrt(((xx - x) * (xx - x)) + ((yy - h) * (yy - h))) * (180 / _width)));
cur._height = cur._height - (par1 * vzr);
cur._y = cur._y + (par2 * vzr);
} else if (hitTest(_local1["land" + Math.round((xx - (_width / 2)) + i)])) {
cur._height = cur._height - (par3 * Math.cos(0.017 * (Math.abs(xx - x) * (180 / _width))));
cur._y = cur._y + ((par3 * Math.cos(0.017 * (Math.abs(xx - x) * (180 / _width)))) / 2);
}
i++;
}
par4 = 13;
par5 = 18;
owner.last_shot_x = _local2._x;
owner.last_shot_y = _local2._y;
owner.last_shot_out = false;
i = 1;
while (_local1.pocet_hracu >= i) {
current = _local1["tank" + i];
if (hitTest(current) || (hitTest(_local1["shield" + i]))) {
x = _local2._x - current._x;
y = _local2._y - current._y;
vzd = Math.sqrt((x * x) + (y * y));
if (!current.sh_active) {
damg = Math.round(_width / ((vzd + 1) / par4));
if (_local1["tank_" + i].energy < damg) {
damg = _local1["tank_" + i].energy;
}
} else {
damg = Math.round(_width / (((vzd / 2) + 1) / par5));
}
current.damage(damg, owner);
}
i++;
}
}
stop();
Symbol 274 MovieClip Frame 6
bum();
f._rotation = f._rotation - _parent._rotation;
Symbol 274 MovieClip Frame 12
_root.strela.strela["shot" + st_number] = true;
_parent.removeMovieClip();
Instance of Symbol 274 MovieClip "strela" in Symbol 275 MovieClip [missile_funky] Frame 1
onClipEvent (load) {
stop();
uhel = (-_parent._rotation) + 90;
g = 9.81;
hit = true;
vox = Math.cos(0.01745329 * uhel) * vo;
voy = Math.sin(0.017 * uhel) * vo;
}
onClipEvent (enterFrame) {
if (((_parent._x < 0) || (_parent._x > 550)) || (_y > 400)) {
_root.strela.strela["shot" + st_number] = true;
_parent.removeMovieClip();
}
if (_currentframe == 1) {
_parent._x = x + (vox * t);
_parent._y = (y - (voy * t)) + ((g / 2) * (t * t));
vox = vox + (_root.vitr / 600);
vox = vox + (inc / 20);
}
if (hitTest(_root["land" + Math.round(_parent._x)])) {
play();
}
i = 1;
while (_root.pocet_hracu >= i) {
if (hitTest(_root["t" + i]) && (i != owner.tank_number)) {
play();
}
if ((hitTest(owner) || (hitTest(_root["shield" + owner.tank_number]))) && (hit == false)) {
play();
}
i++;
}
if ((!hitTest(owner)) && (hit)) {
_parent.swapDepths(depth);
}
if (((!hitTest(owner)) && (hitTest(_root["shield" + owner.tank_number]) == false)) && (hit == true)) {
hit = false;
}
t = t + 0.1;
}
Symbol 276 MovieClip Frame 1
function bum() {
var _local1 = _root;
var _local2 = _parent;
par1 = 15;
par2 = 7.5;
par3 = 15;
i = 0;
while (i < _width) {
cur = _local1["land" + Math.round((_local2._x - (_width / 2)) + i)];
xx = _local2._x;
yy = _local2._y;
x = cur._x;
y = cur._y;
h = cur._y - (cur._height / 2);
if (hitTest(x, h, true)) {
vzr = Math.cos(0.017 * (Math.sqrt(((xx - x) * (xx - x)) + ((yy - h) * (yy - h))) * (180 / _width)));
cur._height = cur._height - (par1 * vzr);
cur._y = cur._y + (par2 * vzr);
} else if (hitTest(_local1["land" + Math.round((xx - (_width / 2)) + i)])) {
cur._height = cur._height - (par3 * Math.cos(0.017 * (Math.abs(xx - x) * (180 / _width))));
cur._y = cur._y + ((par3 * Math.cos(0.017 * (Math.abs(xx - x) * (180 / _width)))) / 2);
}
i++;
}
par4 = 13;
par5 = 18;
owner.last_shot_x = _local2._x;
owner.last_shot_y = _local2._y;
owner.last_shot_out = false;
i = 1;
while (_local1.pocet_hracu >= i) {
current = _local1["tank" + i];
if (hitTest(current) || (hitTest(_local1["shield" + i]))) {
x = _local2._x - current._x;
y = _local2._y - current._y;
vzd = Math.sqrt((x * x) + (y * y));
if (!current.sh_active) {
damg = Math.round(_width / ((vzd + 1) / par4));
if (_local1["tank_" + i].energy < damg) {
damg = _local1["tank_" + i].energy;
}
} else {
damg = Math.round(_width / (((vzd / 2) + 1) / par5));
}
current.damage(damg, owner);
}
i++;
}
}
stop();
Symbol 276 MovieClip Frame 6
bum();
f._rotation = f._rotation - _parent._rotation;
Symbol 276 MovieClip Frame 12
_root.strela.strela["shot" + st_number] = true;
_parent.removeMovieClip();
Instance of Symbol 276 MovieClip "strela" in Symbol 277 MovieClip [amissile] Frame 1
onClipEvent (load) {
stop();
y = -50;
if (uhel == 0) {
x = (x - 120) + (num * 20);
} else {
x = (x + 120) - (num * 20);
}
g = 9.81;
st_number = num;
vo = 10;
vox = Math.cos(0.01745329 * uhel) * vo;
voy = Math.sin(0.017 * uhel) * vo;
t = 0;
}
onClipEvent (enterFrame) {
if (_parent._y > 400) {
_root.strela.strela["shot" + st_number] = true;
_parent.removeMovieClip();
}
if (_currentframe == 1) {
_parent._x = x + (vox * t);
_parent._y = (y - (voy * t)) + ((g / 2) * (t * t));
}
if (hitTest(_root["land" + Math.round(_parent._x)])) {
play();
}
i = 1;
while (_root.pocet_hracu >= i) {
if (hitTest(_root["t" + i])) {
play();
}
i++;
}
t = t + 0.12;
}
Symbol 278 MovieClip Frame 1
function bum() {
var _local1 = _root;
var _local2 = _parent;
par1 = 30;
par2 = 15;
par3 = 15;
i = 0;
while (i < _width) {
cur = _local1["land" + Math.round((_local2._x - (_width / 2)) + i)];
xx = _local2._x;
yy = _local2._y;
x = cur._x;
y = cur._y;
h = cur._y - (cur._height / 2);
if (hitTest(x, h, true)) {
vzr = Math.cos(0.017 * (Math.sqrt(((xx - x) * (xx - x)) + ((yy - h) * (yy - h))) * (180 / _width)));
cur._height = cur._height - (par1 * vzr);
cur._y = cur._y + (par2 * vzr);
} else if (hitTest(_local1["land" + Math.round((xx - (_width / 2)) + i)])) {
cur._height = cur._height - (par3 * Math.cos(0.017 * (Math.abs(xx - x) * (180 / _width))));
cur._y = cur._y + ((par3 * Math.cos(0.017 * (Math.abs(xx - x) * (180 / _width)))) / 2);
}
i++;
}
par4 = 17;
par5 = 24;
owner.last_shot_x = _local2._x;
owner.last_shot_y = _local2._y;
owner.last_shot_out = false;
i = 1;
while (_local1.pocet_hracu >= i) {
current = _local1["tank" + i];
if (hitTest(current) || (hitTest(_local1["shield" + i]))) {
x = _local2._x - current._x;
y = _local2._y - current._y;
vzd = Math.sqrt((x * x) + (y * y));
if (!current.sh_active) {
damg = Math.round(_width / ((vzd + 1) / par4));
if (_local1["tank_" + i].energy < damg) {
damg = _local1["tank_" + i].energy;
}
} else {
damg = Math.round(_width / (((vzd / 2) + 1) / par5));
}
current.damage(damg, owner);
}
i++;
}
}
stop();
Symbol 278 MovieClip Frame 6
bum();
f._rotation = f._rotation - _parent._rotation;
Symbol 278 MovieClip Frame 12
_root.strela.strela["shot" + st_number] = true;
_parent.removeMovieClip();
Instance of Symbol 278 MovieClip "strela" in Symbol 279 MovieClip [bnuke_c] Frame 1
onClipEvent (load) {
stop();
uhel = (-_parent._rotation) + 90;
g = 9.81;
hit = true;
vox = Math.cos(0.01745329 * uhel) * vo;
voy = Math.sin(0.017 * uhel) * vo;
}
onClipEvent (enterFrame) {
if (((_parent._x < 0) || (_parent._x > 550)) || (_y > 400)) {
_root.strela.strela["shot" + st_number] = true;
_parent.removeMovieClip();
}
if (_currentframe == 1) {
_parent._x = x + (vox * t);
_parent._y = (y - (voy * t)) + ((g / 2) * (t * t));
vox = vox + (_root.vitr / 600);
vox = vox + (inc / 20);
}
if (hitTest(_root["land" + Math.round(_parent._x)])) {
play();
}
i = 1;
while (_root.pocet_hracu >= i) {
if (hitTest(_root["t" + i]) && (i != owner.tank_number)) {
play();
}
if ((hitTest(owner) || (hitTest(_root["shield" + owner.tank_number]))) && (hit == false)) {
play();
}
i++;
}
if ((!hitTest(owner)) && (hit)) {
_parent.swapDepths(depth);
}
if (((!hitTest(owner)) && (hitTest(_root["shield" + owner.tank_number]) == false)) && (hit == true)) {
hit = false;
}
t = t + 0.1;
}
Symbol 280 MovieClip Frame 1
function bum() {
var _local1 = _root;
var _local2 = _parent;
par1 = 15;
par2 = 7.5;
par3 = 15;
i = 0;
while (i < _width) {
cur = _local1["land" + Math.round((_local2._x - (_width / 2)) + i)];
xx = _local2._x;
yy = _local2._y;
x = cur._x;
y = cur._y;
h = cur._y - (cur._height / 2);
if (hitTest(x, h, true)) {
vzr = Math.cos(0.017 * (Math.sqrt(((xx - x) * (xx - x)) + ((yy - h) * (yy - h))) * (180 / _width)));
cur._height = cur._height - (par1 * vzr);
cur._y = cur._y + (par2 * vzr);
} else if (hitTest(_local1["land" + Math.round((xx - (_width / 2)) + i)])) {
cur._height = cur._height - (par3 * Math.cos(0.017 * (Math.abs(xx - x) * (180 / _width))));
cur._y = cur._y + ((par3 * Math.cos(0.017 * (Math.abs(xx - x) * (180 / _width)))) / 2);
}
i++;
}
par4 = 13;
par5 = 18;
owner.last_shot_x = _local2._x;
owner.last_shot_y = _local2._y;
owner.last_shot_out = false;
i = 1;
while (_local1.pocet_hracu >= i) {
current = _local1["tank" + i];
if (hitTest(current) || (hitTest(_local1["shield" + i]))) {
x = _local2._x - current._x;
y = _local2._y - current._y;
vzd = Math.sqrt((x * x) + (y * y));
if (!current.sh_active) {
damg = Math.round(_width / ((vzd + 1) / par4));
if (_local1["tank_" + i].energy < damg) {
damg = _local1["tank_" + i].energy;
}
} else {
damg = Math.round(_width / (((vzd / 2) + 1) / par5));
}
current.damage(damg, owner);
}
i++;
}
}
stop();
Symbol 280 MovieClip Frame 4
i = 0;
while (i < 5) {
_root.attachMovie("missile_funky", "strela" + i, 1001 + i);
_root["strela" + i].depth = 10041 + i;
_root["strela" + i]._rotation = random(90) - 45;
_root["strela" + i]._x = _parent._x;
_root["strela" + i]._y = _parent._y - 5;
_root["strela" + i].strela.vo = random(30) + 15;
_root["strela" + i].strela.owner = owner;
_root["strela" + i].strela.st_number = i;
_root["strela" + i].strela.x = _root["strela" + i]._x;
_root["strela" + i].strela.y = _root["strela" + i]._y;
_root["strela" + i].strela.t = 0;
i++;
}
Symbol 280 MovieClip Frame 6
bum();
f._rotation = f._rotation - _parent._rotation;
Symbol 280 MovieClip Frame 12
test_ = true;
i = 0;
while (i < 5) {
if (this["shot" + i] != true) {
test_ = false;
break;
}
i++;
}
if (test_ == true) {
gotoAndStop (14);
}
Symbol 280 MovieClip Frame 13
gotoAndPlay(_currentframe - 1);
Symbol 280 MovieClip Frame 14
_root.test();
_parent.removeMovieClip();
Instance of Symbol 280 MovieClip "strela" in Symbol 281 MovieClip [funky_g] Frame 1
onClipEvent (load) {
stop();
depth = 10040;
uhel = (-_parent._rotation) + 90;
g = 9.81;
t = 0;
x = _parent._x;
hit = true;
y = _parent._y;
vox = Math.cos(0.01745329 * uhel) * vo;
voy = Math.sin(0.017 * uhel) * vo;
_root.shot_flying = true;
}
onClipEvent (enterFrame) {
if (((_parent._x < 0) || (_parent._x > 550)) || (_y > 400)) {
_root.shot_flying = false;
owner.last_shot_x = _parent._x;
owner.last_shot_y = _parent._y;
owner.last_shot_out = true;
_root.test();
_parent.removeMovieClip();
}
if (_currentframe == 1) {
_parent._x = x + (vox * t);
_parent._y = (y - (voy * t)) + ((g / 2) * (t * t));
vox = vox + (_root.vitr / 600);
}
if (hitTest(_root["land" + Math.round(_parent._x)])) {
play();
}
i = 1;
while (_root.pocet_hracu >= i) {
if (hitTest(_root["t" + i]) && (i != owner.tank_number)) {
play();
}
if ((hitTest(owner) || (hitTest(_root["shield" + owner.tank_number]))) && (hit == false)) {
play();
}
i++;
}
if ((!hitTest(owner)) && (hit)) {
_parent.swapDepths(depth);
}
if (((!hitTest(owner)) && (hitTest(_root["shield" + owner.tank_number]) == false)) && (hit == true)) {
hit = false;
}
t = t + 0.1;
}
Symbol 282 MovieClip Frame 1
function bum() {
var _local1 = _root;
var _local2 = _parent;
par1 = 15;
par2 = 7.5;
par3 = 15;
i = 0;
while (i < _width) {
cur = _local1["land" + Math.round((_local2._x - (_width / 2)) + i)];
xx = _local2._x;
yy = _local2._y;
x = cur._x;
y = cur._y;
h = cur._y - (cur._height / 2);
if (hitTest(x, h, true)) {
vzr = Math.cos(0.017 * (Math.sqrt(((xx - x) * (xx - x)) + ((yy - h) * (yy - h))) * (180 / _width)));
cur._height = cur._height - (par1 * vzr);
cur._y = cur._y + (par2 * vzr);
} else if (hitTest(_local1["land" + Math.round((xx - (_width / 2)) + i)])) {
cur._height = cur._height - (par3 * Math.cos(0.017 * (Math.abs(xx - x) * (180 / _width))));
cur._y = cur._y + ((par3 * Math.cos(0.017 * (Math.abs(xx - x) * (180 / _width)))) / 2);
}
i++;
}
par4 = 13;
par5 = 18;
owner.last_shot_x = _local2._x;
owner.last_shot_y = _local2._y;
owner.last_shot_out = false;
i = 1;
while (_local1.pocet_hracu >= i) {
current = _local1["tank" + i];
if (hitTest(current) || (hitTest(_local1["shield" + i]))) {
x = _local2._x - current._x;
y = _local2._y - current._y;
vzd = Math.sqrt((x * x) + (y * y));
if (!current.sh_active) {
damg = Math.round(_width / ((vzd + 1) / par4));
if (_local1["tank_" + i].energy < damg) {
damg = _local1["tank_" + i].energy;
}
} else {
damg = Math.round(_width / (((vzd / 2) + 1) / par5));
}
current.damage(damg, owner);
}
i++;
}
}
function bum2() {
var _local1 = _root;
var _local2 = _parent;
i = 0;
while (i < 5) {
_local1.attachMovie("missile_funky", "strela" + i, 1001 + i);
_local1["strela" + i].depth = 10041 + i;
_local1["strela" + i]._rotation = _local2._rotation;
_local1["strela" + i].strela.x = x + (_local1.vitr / 7);
_local1["strela" + i].strela.y = y;
_local1["strela" + i].strela.t = t;
_local1["strela" + i].strela.vox = vox;
_local1["strela" + i].strela.voy = voy;
_local1["strela" + i].strela.vo = vo;
_local1["strela" + i].strela.owner = owner;
_local1["strela" + i].strela.st_number = i;
_local1["strela" + i].strela.inc = -2 + i;
i++;
}
}
stop();
Symbol 282 MovieClip Frame 6
bum();
f._rotation = f._rotation - _parent._rotation;
Symbol 282 MovieClip Frame 12
test_ = true;
i = 0;
while (i < 5) {
if (this["shot" + i] != true) {
test_ = false;
break;
}
i++;
}
if (test_ || (end)) {
gotoAndStop (14);
}
Symbol 282 MovieClip Frame 13
gotoAndPlay(_currentframe - 1);
Symbol 282 MovieClip Frame 14
_root.test();
_parent.removeMovieClip();
Instance of Symbol 282 MovieClip "strela" in Symbol 283 MovieClip [mirv_g] Frame 1
onClipEvent (load) {
stop();
depth = 10040;
uhel = (-_parent._rotation) + 90;
g = 9.81;
t = 0;
x = _parent._x;
hit = true;
y = _parent._y;
vox = Math.cos(0.01745329 * uhel) * vo;
voy = Math.sin(0.017 * uhel) * vo;
_root.shot_flying = true;
}
onClipEvent (enterFrame) {
if (((_parent._x < 0) || (_parent._x > 550)) || (_y > 400)) {
gotoAndPlay (12);
}
if (_currentframe == 1) {
_parent._x = x + (vox * t);
_parent._y = (y - (voy * t)) + ((g / 2) * (t * t));
vox = vox + (_root.vitr / 600);
}
if (hitTest(_root["land" + Math.round(_parent._x)])) {
play();
}
i = 1;
while (_root.pocet_hracu >= i) {
if (hitTest(_root["tank" + i]) && (i != owner.tank_number)) {
play();
}
if (hitTest(owner) && (hit == false)) {
play();
}
i++;
}
if (!hitTest(owner)) {
hit = false;
}
if ((Math.round(t * 10) / 10) == 3) {
if (_currentframe == 1) {
bum2();
} else {
end = true;
}
}
t = t + 0.1;
}
Symbol 284 MovieClip Frame 1
function bum() {
var _local1 = _root;
var _local2 = _parent;
par1 = 15;
par2 = 7.5;
par3 = 15;
i = 0;
while (i < _width) {
cur = _local1["land" + Math.round((_local2._x - (_width / 2)) + i)];
xx = _local2._x;
yy = _local2._y;
x = cur._x;
y = cur._y;
h = cur._y - (cur._height / 2);
if (hitTest(x, h, true)) {
vzr = Math.cos(0.017 * (Math.sqrt(((xx - x) * (xx - x)) + ((yy - h) * (yy - h))) * (180 / _width)));
cur._height = cur._height - (par1 * vzr);
cur._y = cur._y + (par2 * vzr);
} else if (hitTest(_local1["land" + Math.round((xx - (_width / 2)) + i)])) {
cur._height = cur._height - (par3 * Math.cos(0.017 * (Math.abs(xx - x) * (180 / _width))));
cur._y = cur._y + ((par3 * Math.cos(0.017 * (Math.abs(xx - x) * (180 / _width)))) / 2);
}
i++;
}
par4 = 13;
par5 = 20;
owner.last_shot_x = _local2._x;
owner.last_shot_y = _local2._y;
owner.last_shot_out = false;
i = 1;
while (_local1.pocet_hracu >= i) {
current = _local1["tank" + i];
if (hitTest(current) || (hitTest(_local1["shield" + i]))) {
x = _local2._x - current._x;
y = _local2._y - current._y;
vzd = Math.sqrt((x * x) + (y * y));
if (!current.sh_active) {
damg = Math.round(_width / ((vzd + 1) / par4));
if (_local1["tank_" + i].energy < damg) {
damg = _local1["tank_" + i].energy;
}
} else {
damg = Math.round(_width / (((vzd / 2) + 1) / par5));
}
current.damage(damg, owner);
}
i++;
}
}
function bum2() {
var _local1 = _root;
var _local2 = _parent;
i = 0;
while (i < 7) {
_local1.attachMovie("bnuke_c", "strela" + i, 1001 + i);
_local1["strela" + i].depth = 10041 + i;
_local1["strela" + i]._rotation = _local2._rotation;
_local1["strela" + i].strela.x = x + (_local1.vitr / 7);
_local1["strela" + i].strela.y = y;
_local1["strela" + i].strela.t = t;
_local1["strela" + i].strela.vox = vox;
_local1["strela" + i].strela.voy = voy;
_local1["strela" + i].strela.vo = vo;
_local1["strela" + i].strela.owner = owner;
_local1["strela" + i].strela.st_number = i;
_local1["strela" + i].strela.inc = -3 + i;
i++;
}
}
stop();
Symbol 284 MovieClip Frame 6
bum();
f._rotation = f._rotation - _parent._rotation;
Symbol 284 MovieClip Frame 12
test_ = true;
i = 0;
while (i < 7) {
if (this["shot" + i] != true) {
test_ = false;
break;
}
i++;
}
if (test_ || (end)) {
gotoAndStop (14);
}
Symbol 284 MovieClip Frame 13
gotoAndPlay(_currentframe - 1);
Symbol 284 MovieClip Frame 14
_root.test();
_parent.removeMovieClip();
Instance of Symbol 284 MovieClip "strela" in Symbol 285 MovieClip [death_g] Frame 1
onClipEvent (load) {
stop();
depth = 10040;
uhel = (-_parent._rotation) + 90;
g = 9.81;
t = 0;
x = _parent._x;
hit = true;
y = _parent._y;
vox = Math.cos(0.01745329 * uhel) * vo;
voy = Math.sin(0.017 * uhel) * vo;
_root.shot_flying = true;
}
onClipEvent (enterFrame) {
if (((_parent._x < 0) || (_parent._x > 550)) || (_y > 400)) {
gotoAndPlay (12);
}
if (_currentframe == 1) {
_parent._x = x + (vox * t);
_parent._y = (y - (voy * t)) + ((g / 2) * (t * t));
vox = vox + (_root.vitr / 600);
}
if (hitTest(_root["land" + Math.round(_parent._x)])) {
play();
}
i = 1;
while (_root.pocet_hracu >= i) {
if (hitTest(_root["tank" + i]) && (i != owner.tank_number)) {
play();
}
if (hitTest(owner) && (hit == false)) {
play();
}
i++;
}
if (!hitTest(owner)) {
hit = false;
}
if ((Math.round(t * 10) / 10) == 3) {
if (_currentframe == 1) {
bum2();
} else {
end = true;
}
}
t = t + 0.1;
}
Symbol 286 MovieClip Frame 1
function bum() {
var _local1 = _root;
var _local2 = _parent;
par1 = 30;
par2 = 15;
par3 = 15;
i = 0;
while (i < _width) {
cur = _local1["land" + Math.round((_local2._x - (_width / 2)) + i)];
xx = _local2._x;
yy = _local2._y;
x = cur._x;
y = cur._y;
h = cur._y - (cur._height / 2);
if (hitTest(x, h, true)) {
vzr = Math.cos(0.017 * (Math.sqrt(((xx - x) * (xx - x)) + ((yy - h) * (yy - h))) * (180 / _width)));
cur._height = cur._height - (par1 * vzr);
cur._y = cur._y + (par2 * vzr);
} else if (hitTest(_local1["land" + Math.round((xx - (_width / 2)) + i)])) {
cur._height = cur._height - (par3 * Math.cos(0.017 * (Math.abs(xx - x) * (180 / _width))));
cur._y = cur._y + ((par3 * Math.cos(0.017 * (Math.abs(xx - x) * (180 / _width)))) / 2);
}
i++;
}
par4 = 17;
par5 = 24;
owner.last_shot_x = _local2._x;
owner.last_shot_y = _local2._y;
owner.last_shot_out = false;
i = 1;
while (_local1.pocet_hracu >= i) {
current = _local1["tank" + i];
if (hitTest(current) || (hitTest(_local1["shield" + i]))) {
x = _local2._x - current._x;
y = _local2._y - current._y;
vzd = Math.sqrt((x * x) + (y * y));
if (!current.sh_active) {
damg = Math.round(_width / ((vzd + 1) / par4));
if (_local1["tank_" + i].energy < damg) {
damg = _local1["tank_" + i].energy;
}
} else {
damg = Math.round(_width / (((vzd / 2) + 1) / par5));
}
current.damage(damg, owner);
}
i++;
}
}
stop();
Symbol 286 MovieClip Frame 6
bum();
f._rotation = f._rotation - _parent._rotation;
Symbol 286 MovieClip Frame 12
_root.test();
_parent.removeMovieClip();
Instance of Symbol 286 MovieClip "strela" in Symbol 287 MovieClip [bnuke_g] Frame 1
onClipEvent (load) {
stop();
depth = 10040;
uhel = (-_parent._rotation) + 90;
g = 9.81;
t = 0;
x = _parent._x;
hit = true;
y = _parent._y;
vox = Math.cos(0.01745329 * uhel) * vo;
voy = Math.sin(0.017 * uhel) * vo;
_root.shot_flying = true;
}
onClipEvent (enterFrame) {
if (((_parent._x < 0) || (_parent._x > 550)) || (_y > 400)) {
_root.shot_flying = false;
owner.last_shot_x = _parent._x;
owner.last_shot_y = _parent._y;
owner.last_shot_out = true;
_root.test();
_parent.removeMovieClip();
}
if (_currentframe == 1) {
_parent._x = x + (vox * t);
_parent._y = (y - (voy * t)) + ((g / 2) * (t * t));
vox = vox + (_root.vitr / 600);
}
if (hitTest(_root["land" + Math.round(_parent._x)])) {
play();
}
i = 1;
while (_root.pocet_hracu >= i) {
if (hitTest(_root["t" + i]) && (i != owner.tank_number)) {
play();
}
if ((hitTest(owner) || (hitTest(_root["shield" + owner.tank_number]))) && (hit == false)) {
play();
}
i++;
}
if ((!hitTest(owner)) && (hit)) {
_parent.swapDepths(depth);
}
if (((!hitTest(owner)) && (hitTest(_root["shield" + owner.tank_number]) == false)) && (hit == true)) {
hit = false;
}
t = t + 0.1;
}
Symbol 288 MovieClip Frame 1
function bum() {
var _local1 = _root;
var _local2 = _parent;
par1 = 35;
par2 = 30;
par3 = 30;
i = 0;
while (i < _width) {
cur = _local1["land" + Math.round((_local2._x - (_width / 2)) + i)];
xx = _local2._x;
yy = _local2._y;
x = cur._x;
y = cur._y;
h = cur._y - (cur._height / 2);
if (hitTest(x, h, true)) {
vzr = Math.cos(0.017 * (Math.sqrt(((xx - x) * (xx - x)) + ((yy - h) * (yy - h))) * (180 / _width)));
cur._height = cur._height - (par1 * vzr);
cur._y = cur._y + (par2 * vzr);
} else if (hitTest(_local1["land" + Math.round((xx - (_width / 2)) + i)])) {
cur._height = cur._height - (par3 * Math.cos(0.017 * (Math.abs(xx - x) * (180 / _width))));
cur._y = cur._y + ((par3 * Math.cos(0.017 * (Math.abs(xx - x) * (180 / _width)))) / 2);
}
i++;
}
par4 = 22;
par5 = 40;
owner.last_shot_x = _local2._x;
owner.last_shot_y = _local2._y;
owner.last_shot_out = false;
i = 1;
while (_local1.pocet_hracu >= i) {
current = _local1["tank" + i];
if (hitTest(current) || (hitTest(_local1["shield" + i]))) {
x = _local2._x - current._x;
y = _local2._y - current._y;
vzd = Math.sqrt((x * x) + (y * y));
if (!current.sh_active) {
damg = Math.round(_width / ((vzd + 1) / par4));
if (_local1["tank_" + i].energy < damg) {
damg = _local1["tank_" + i].energy;
}
} else {
damg = Math.round(_width / (((vzd / 2) + 1) / par5));
}
current.damage(damg, owner);
}
i++;
}
}
stop();
Symbol 288 MovieClip Frame 6
bum();
f._rotation = f._rotation - _parent._rotation;
Symbol 288 MovieClip Frame 12
_root.test();
_parent.removeMovieClip();
Instance of Symbol 288 MovieClip "strela" in Symbol 289 MovieClip [nuke_g] Frame 1
onClipEvent (load) {
stop();
depth = 10040;
uhel = (-_parent._rotation) + 90;
g = 9.81;
t = 0;
x = _parent._x;
hit = true;
y = _parent._y;
vox = Math.cos(0.01745329 * uhel) * vo;
voy = Math.sin(0.017 * uhel) * vo;
_root.shot_flying = true;
}
onClipEvent (enterFrame) {
if (((_parent._x < 0) || (_parent._x > 550)) || (_y > 400)) {
_root.shot_flying = false;
owner.last_shot_x = _parent._x;
owner.last_shot_y = _parent._y;
owner.last_shot_out = true;
_root.test();
_parent.removeMovieClip();
}
if (_currentframe == 1) {
_parent._x = x + (vox * t);
_parent._y = (y - (voy * t)) + ((g / 2) * (t * t));
vox = vox + (_root.vitr / 600);
}
if (hitTest(_root["land" + Math.round(_parent._x)])) {
play();
}
i = 1;
while (_root.pocet_hracu >= i) {
if (hitTest(_root["t" + i]) && (i != owner.tank_number)) {
play();
}
if ((hitTest(owner) || (hitTest(_root["shield" + owner.tank_number]))) && (hit == false)) {
play();
}
i++;
}
if ((!hitTest(owner)) && (hit)) {
_parent.swapDepths(depth);
}
if (((!hitTest(owner)) && (hitTest(_root["shield" + owner.tank_number]) == false)) && (hit == true)) {
hit = false;
}
t = t + 0.1;
}
Symbol 298 MovieClip [tank] Frame 1
function test_hill() {
var _local1 = _root;
calc_hill_up();
if (((_local1["land" + Math.ceil(_x - (_width / 2))]._y - (_local1["land" + Math.ceil(_x - (_width / 2))]._height / 2)) < (_y - hill_up)) || ((_local1["land" + Math.floor(_x - (_width / 2))]._y - (_local1["land" + Math.floor(_x - (_width / 2))]._height / 2)) < (_y - hill_up))) {
_x = (_x + 0.7);
test = false;
left = false;
right = false;
} else if (((_local1["land" + Math.floor(_x + (_width / 2))]._y - (_local1["land" + Math.floor(_x + (_width / 2))]._height / 2)) < (_y - hill_up)) || ((_local1["land" + Math.ceil(_x + (_width / 2))]._y - (_local1["land" + Math.ceil(_x + (_width / 2))]._height / 2)) < (_y - hill_up))) {
left = false;
right = false;
_x = (_x - 0.7);
test = false;
} else {
left = true;
right = true;
}
}
function blik() {
var _local1 = _root;
_local1.attachMovie("blk", "blik", 10030);
_local1.blik._x = _x;
_local1.blik._y = _y - 10;
}
function calc_hill_up() {
hill_up = (0.5 + _root["tank_" + tank_number].specials[11]) - (fall * 10);
}
function move_left() {
var _local1 = _root;
_x = (_x - 0.5);
_local1["tank_" + tank_number].fuel = _local1["tank_" + tank_number].fuel - fuel_c;
moving = true;
i = 1;
while (i < (_local1.pocet_hracu + 1)) {
if (hitTest(_local1["tank" + i]) && (i != tank_number)) {
_x = (_x + 0.6);
}
i++;
}
}
function move_right() {
var _local1 = _root;
_x = (_x + 0.5);
_local1["tank_" + tank_number].fuel = _local1["tank_" + tank_number].fuel - fuel_c;
moving = true;
i = 1;
while (i < (_local1.pocet_hracu + 1)) {
if (hitTest(_local1["tank" + i]) && (i != tank_number)) {
_x = (_x - 0.6);
}
i++;
}
}
function activate_shield(shield) {
var _local1 = _root;
_local1.attachMovie(_local1.specials[2 + shield][4], "shield" + tank_number, 5040 + tank_number);
_local1["shield" + tank_number].num = tank_number;
_local1["tank_" + tank_number].specials[2 + shield]--;
sh_active = true;
_local1["t" + tank_number] = _local1["shield" + tank_number];
}
function disable_shield() {
var _local1 = _root;
_local1["shield" + tank_number].disable();
sh_active = false;
_local1["t" + tank_number] = _local1["tank" + tank_number];
}
function damage(damag, attacker, par) {
var _local1 = _root;
var _local2 = attacker;
var _local3 = damag;
armor = 1;
arm = 1;
i = 0;
while (i < _local1["tank_" + tank_number].specials[9]) {
armor = armor / (1.12 / arm);
arm = arm / 1.0002;
i++;
}
if ((!sh_active) || (par)) {
_local1["tank_" + tank_number].energy = _local1["tank_" + tank_number].energy - (_local3 * armor);
} else {
_local1["shield" + tank_number].damage(_local3, _local2);
}
if (_local1["tank_" + tank_number].energy <= 0) {
if (this != _local2) {
_local1["tank_" + _local2.tank_number].kills = _local1["tank_" + _local2.tank_number].kills + 1;
_local1["tank_" + _local2.tank_number].score = _local1["tank_" + _local2.tank_number].score + 5000;
_local1["tank_" + _local2.tank_number].total_score = _local1["tank_" + _local2.tank_number].total_score + 5000;
} else {
_local1["tank_" + tank_number].kills = _local1["tank_" + tank_number].kills - 1;
_local1["tank_" + tank_number].score = _local1["tank_" + tank_number].score - 2000;
_local1["tank_" + tank_number].total_score = _local1["tank_" + tank_number].total_score - 2000;
}
}
if (this != _local2) {
_local1["tank_" + _local2.tank_number].score = _local1["tank_" + _local2.tank_number].score + (_local3 * 100);
_local1["tank_" + _local2.tank_number].total_score = _local1["tank_" + _local2.tank_number].total_score + (_local3 * 100);
} else {
if (par) {
_local3 = _local3 / 3;
}
_local1["tank_" + tank_number].score = _local1["tank_" + tank_number].score - Math.round(_local3 * 50);
_local1["tank_" + tank_number].total_score = _local1["tank_" + tank_number].total_score - Math.round(_local3 * 50);
if (_local1["tank_" + tank_number].score < 0) {
_local1["tank_" + tank_number].score = 0;
}
}
}
function na_rade() {
par_active = false;
calc_hill_up();
}
function fire() {
var _local1 = _root;
testing = true;
_local1.attachMovie(_local1.weapons[_local1["tank_" + tank_number].cur_gun][4], "strela", 1000);
if (_local1["tank_" + tank_number].cur_gun != 0) {
_local1["tank_" + tank_number].guns[_local1["tank_" + tank_number].cur_gun]--;
if (_local1["tank_" + tank_number].guns[_local1["tank_" + tank_number].cur_gun] == 0) {
_local1["tank_" + tank_number].cur_gun = 0;
}
}
_local1.strela._rotation = rotace - 90;
_local1.strela._x = _x;
_local1.strela._y = _y - 1;
_local1.strela.strela.vo = power;
_local1.strela.strela.owner = _local1[_name];
_local1[_name + "_hlaven"].play();
playing = false;
}
_y = ((_root["land" + Math.round(_x)]._y - (_root["land" + Math.round(_x)]._height / 2)) - 4);
i = 0;
while (i < _width) {
cur = _root["land" + Math.floor((_x - (_width / 2)) + i)];
if (hitTest(cur)) {
cur._y = cur._y + ((_y + (_height / 2)) - (cur._y - (cur._height / 2)));
}
i++;
}
if (_root["tank_" + tank_number].specials[0] > 0) {
par = true;
}
_root.attachMovie("hlaven", _name + "_hlaven", 10010 + tank_number);
rotace = (random(67) * 2) + 46;
_root[_name + "_hlaven"]._x = _x;
_root[_name + "_hlaven"]._y = _y - 1;
_root[_name + "_hlaven"]._rotation = rotace;
power = 50;
playing = false;
testing = false;
par_active = false;
par_out = false;
par_used = false;
sh_active = false;
_root["t" + tank_number] = _root["tank" + tank_number];
fuel_c = 1 / (_root["tank_" + tank_number].specials[10] + 1);
Symbol 298 MovieClip [tank] Frame 2
if (_y > 400) {
_root["tank_" + tank_number].live = false;
_root["tank_" + tank_number].energy = 0;
_root["tank_" + tank_number].score = _root["tank_" + tank_number].score - 2000;
_root.hracu--;
if (_root["tank_" + tank_number].score < 0) {
_root["tank_" + tank_number].score = 0;
}
gotoAndPlay (4);
}
if (_root["tank_" + tank_number].energy <= 0) {
_root["tank_" + tank_number].energy = 0;
_root["tank_" + tank_number].live = false;
gotoAndPlay (4);
}
_root[_name + "_hlaven"]._x = _x;
_root[_name + "_hlaven"]._y = _y - 1;
if (sh_active) {
_root["shield" + tank_number]._x = _x;
_root["shield" + tank_number]._y = _y;
}
if (playing) {
_root.rotace = rotace;
_root.power = power;
if (((Key.isDown(37) && (left)) && (_root["tank_" + tank_number].fuel > 0)) && (_x > 10)) {
move_left();
} else if (((Key.isDown(39) && (right)) && (_root["tank_" + tank_number].fuel > 0)) && (_x < 540)) {
move_right();
} else {
moving = false;
}
if (Key.isDown(32)) {
fire();
}
na_zemi = false;
left = true;
right = true;
i = 0;
min = 500;
gg = false;
test_hill();
while (i < _width) {
cur = _root["land" + Math.round((_x - (_width / 2)) + i)];
if (pasy.hitTest(cur)) {
na_zemi = true;
if (par_out) {
par_out = false;
_root["parachute" + tank_number].removeMovieClip();
}
if (fall > 0.4) {
if (fall < 2) {
damage(Math.round(fall * 25), this, true);
} else {
damage(Math.round((fall * fall) * 3000), this, true);
}
}
fall = 0;
}
top = cur._y - (cur._height / 2);
if ((top < min) && (na_zemi)) {
gg = true;
min = top;
}
if ((((i + 1) >= _width) && (na_zemi)) && (gg)) {
_y = (min - 2);
gg = false;
}
if (!na_zemi) {
if ((fall >= 0.2) && (par)) {
if (!par_active) {
par_active = true;
_root["tank_" + i].specials[0] = _root["tank_" + i].specials[0] - 1;
}
if (!par_out) {
_root.attachMovie("parachute", "parachute" + tank_number, 9000 + tank_number);
}
par_out = true;
}
_y = (_y + fall);
if (!par_out) {
fall = fall + 0.01;
} else {
_root["parachute" + tank_number]._x = _x;
_root["parachute" + tank_number]._y = _y - 7.5;
fall = 0.2;
_x = (_x + (_root.vitr / 3000));
}
}
i++;
}
if ((Key.isDown(33) && (power < 100)) && (_root["tank_" + tank_number].energy >= power)) {
power = power + 1;
} else if (Key.isDown(34) && (power > 0)) {
power = power - 1;
}
if (_root["tank_" + tank_number].energy < power) {
power = _root["tank_" + tank_number].energy;
}
if (Key.isDown(38) && (rotace < 180)) {
rotace = rotace + 2;
_root.tur.play();
}
if (Key.isDown(40) && (rotace > 0)) {
rotace = rotace - 2;
_root.tur.play();
}
_root[_name + "_hlaven"]._rotation = rotace;
}
if (testing) {
i = 0;
min = 500;
gg = false;
test_hill();
while (i < _width) {
cur = _root["land" + Math.round((_x - (_width / 2)) + i)];
if (pasy.hitTest(cur)) {
if (fall > 0.4) {
if (fall < 0.8) {
damage(Math.round(fall * 25), this, true);
} else {
damage(Math.round((fall * fall) * 80), this, true);
}
}
if (par_out) {
par_out = false;
_root["parachute" + tank_number].removeMovieClip();
}
na_zemi = true;
fall = 0;
}
top = cur._y - (cur._height / 2);
if ((top < min) && (na_zemi)) {
gg = true;
min = top;
}
if ((((i + 1) >= _width) && (na_zemi)) && (gg)) {
_y = (min - 2);
gg = false;
}
if (fall > 0.001) {
test = false;
}
if (!na_zemi) {
if ((fall >= 0.2) && (par)) {
if (!par_active) {
par_active = true;
_root["tank_" + tank_number].specials[0] = _root["tank_" + tank_number].specials[0] - 1;
}
if (!par_out) {
_root.attachMovie("parachute", "parachute" + tank_number, 9000 + tank_number);
}
par_out = true;
}
_y = (_y + fall);
if (!par_out) {
fall = fall + 0.01;
} else {
_root["parachute" + tank_number]._x = _x;
_root["parachute" + tank_number]._y = _y - 7.5;
fall = 0.2;
_x = (_x + (_root.vitr / 3000));
}
}
i++;
}
if (fall > 0.001) {
test = false;
}
test_hill();
x3 = x2;
x2 = x1;
x1 = Math.round(_x);
y3 = y2;
y2 = y1;
y1 = Math.round(_y * 10) / 10;
if ((y1 == y3) && (x1 == x3)) {
test = true;
}
if (test) {
testing = false;
_root[_name + "test"] = false;
}
_root[_name + "_hlaven"]._x = _x;
_root[_name + "_hlaven"]._y = _y - 1;
test = true;
}
Symbol 298 MovieClip [tank] Frame 3
gotoAndPlay (2);
Symbol 298 MovieClip [tank] Frame 4
_root[_name + "_hlaven"].removeMovieClip();
_root["parachute" + tank_number].removeMovieClip();
_root["shield" + tank_number].removeMovieClip();
_root.hracu--;
Symbol 298 MovieClip [tank] Frame 9
i = 0;
while (i < _width) {
cur = _root["land" + Math.round((_x - (_width / 2)) + i)];
x = cur._x;
y = cur._y;
h = cur._y - (cur._height / 2);
if (hitTest(x, h, true)) {
vzr = Math.cos(0.017 * (Math.sqrt(((_x - x) * (_x - x)) + ((_y - h) * (_y - h))) * (180 / _width)));
cur._height = cur._height - (30 * vzr);
cur._y = cur._y + (15 * vzr);
} else if (hitTest(_root["land" + Math.round((xx - (_width / 2)) + i)])) {
cur._height = cur._height - (50 / Math.abs(_x - x));
cur._y = cur._y + ((50 / Math.abs(_x - x)) / 2);
}
i++;
}
i = 1;
while (_root.pocet_hracu >= i) {
current = _root["tank" + i];
if ((hitTest(current) || (hitTest(_root["shield" + i]))) && (i != tank_number)) {
x = _x - current._x;
y = _y - current._y;
vzd = Math.sqrt((x * x) + (y * y));
if (!current.sh_active) {
damg = Math.round(_width / ((vzd + 1) / 14));
if (_root["tank_" + i].energy < damg) {
damg = _root["tank_" + i].energy;
}
} else {
damg = Math.round(_width / (((vzd / 2) + 1) / 18));
}
current.damage(damg, this);
}
i++;
}
Symbol 298 MovieClip [tank] Frame 15
if (playing) {
_root.test();
}
stop();
Symbol 301 MovieClip [ai_very_hard] Frame 1
function test_hill() {
var _local1 = _root;
calc_hill_up();
if (((_local1["land" + Math.ceil(_x - (_width / 2))]._y - (_local1["land" + Math.ceil(_x - (_width / 2))]._height / 2)) < (_y - hill_up)) || ((_local1["land" + Math.floor(_x - (_width / 2))]._y - (_local1["land" + Math.floor(_x - (_width / 2))]._height / 2)) < (_y - hill_up))) {
_x = (_x + 0.7);
test = false;
left = false;
right = false;
} else if (((_local1["land" + Math.floor(_x + (_width / 2))]._y - (_local1["land" + Math.floor(_x + (_width / 2))]._height / 2)) < (_y - hill_up)) || ((_local1["land" + Math.ceil(_x + (_width / 2))]._y - (_local1["land" + Math.ceil(_x + (_width / 2))]._height / 2)) < (_y - hill_up))) {
left = false;
right = false;
_x = (_x - 0.7);
test = false;
} else {
left = true;
right = true;
}
}
function blik() {
var _local1 = _root;
_local1.attachMovie("blk", "blik", 10030);
_local1.blik._x = _x;
_local1.blik._y = _y - 10;
}
function calc_hill_up() {
hill_up = (0.5 + _root["tank_" + tank_number].specials[11]) - (fall * 10);
}
function move_left() {
var _local1 = _root;
_x = (_x - 0.5);
_local1["tank_" + tank_number].fuel = _local1["tank_" + tank_number].fuel - fuel_c;
moving = true;
i = 1;
while (i < (_local1.pocet_hracu + 1)) {
if (hitTest(_local1["tank" + i]) && (i != tank_number)) {
_x = (_x + 0.6);
}
i++;
}
}
function move_right() {
var _local1 = _root;
_x = (_x + 0.5);
_local1["tank_" + tank_number].fuel = _local1["tank_" + tank_number].fuel - fuel_c;
moving = true;
i = 1;
while (i < (_local1.pocet_hracu + 1)) {
if (hitTest(_local1["tank" + i]) && (i != tank_number)) {
_x = (_x - 0.6);
}
i++;
}
}
function activate_shield(shield) {
var _local1 = _root;
_local1.attachMovie(_local1.specials[2 + shield][4], "shield" + tank_number, 5040 + tank_number);
_local1["shield" + tank_number].num = tank_number;
_local1["tank_" + tank_number].specials[2 + shield]--;
sh_active = true;
_local1["t" + tank_number] = _local1["shield" + tank_number];
}
function disable_shield() {
var _local1 = _root;
_local1["shield" + tank_number].disable();
sh_active = false;
_local1["t" + tank_number] = _local1["tank" + tank_number];
}
function p_m(par) {
if (par > 0) {
return(1);
}
return(-1);
}
function calc_first_shot() {
var _local1 = _root;
p_rotace = 90 + (p_m(target._x - _x) * 45);
p_x = _x;
p_power = ((Math.abs(_x - target._x) / (2 + (Math.abs(_x - target._x) / 80))) - ((p_m(target._x - _x) * _local1.vitr) / 13)) + ((_y - target._y) / 20);
if (p_power >= _local1["tank_" + tank_number].energy) {
p_power = _local1["tank_" + tank_number].energy;
}
}
function calc_shot() {
var _local1 = _root;
last_shot_vzd = Math.sqrt(Math.abs((_x - last_shot_x) * (_x - last_shot_x)) + Math.abs((_y - last_shot_y) * (_y - last_shot_y)));
target_vzd = Math.sqrt(Math.abs((_x - target._x) * (_x - target._x)) + Math.abs((_y - target._y) * (_y - target._y)));
x_vzd = Math.abs(last_shot_x - target._x);
y_vzd = Math.abs(last_shot_y - target._y);
if ((power >= _local1["tank_" + tank_number].energy) || (power == 100)) {
full_power = true;
} else {
full_power = false;
}
wind_change_koef = 7;
wind_koef_vzd_koef = 380;
vzd_koef = 10.9;
vzd_koef_k = 7 + (Math.abs(_x - last_shot_x) / 80);
y_vzd_koef = 30;
y_koef = 22;
rot_r = 100 - ((200 - Math.abs(_x - target._x)) / 30);
rot_l = 80 + ((200 - Math.abs(_x - target._x)) / 30);
if (_x < target._x) {
wind_koef_vzd_koef = wind_koef_vzd_koef - ((180 - rotace) * 3);
y_koef = y_koef + ((135 - rotace) * 1.7);
if (last_shot_x < _x) {
_local1.z_f_used = "1.1";
p_rotace = p_rotace + ((((_x - last_shot_x) / 10) + ((target._x - _x) / 20)) - (_local1.vitr / 50));
} else if ((((last_shot_vzd > 60) || (target_vzd < 70)) || (power < 10)) && ((power < 70) || (last_shot_vzd > 200))) {
_local1.z_f_used = "1.2.1.failed";
if (last_shot_x >= target._x) {
if (x_vzd > 20) {
_local1.z_f_used = "1.2.1.1.1";
p_power = p_power - (((x_vzd / ((vzd_koef + 2.5) - (Math.abs(135 - rotace) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) - ((last_shot_y - target._y) / y_koef));
} else {
_local1.z_f_used = "1.2.1.1.2";
p_power = p_power - ((x_vzd / ((vzd_koef - 1) - (Math.abs(135 - rotace) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
}
} else if (last_shot_y < target._y) {
if (target._y < _y) {
if ((((((((_y - target._y) > 80) && (y_vzd < 80)) && (y_vzd > 20)) && (last_shot_vzd < 100)) && (target_vzd > 220)) && (power > 30)) && ((rot_r - (_local1.vitr / 7)) < rotace)) {
_local1.z_f_used = "1.2.1.2.1.1.1";
p_rotace = p_rotace - ((((rotace - (rot_r - (_local1.vitr / 7))) / 4) + (_local1.vitr / 20)) - (target_vzd / 100));
} else if (rotace < (rot_r - (_local1.vitr / 7))) {
_local1.z_f_used = "1.2.1.2.1.1.2.";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if ((y_vzd < 30) && (x_vzd < 200)) {
_local1.z_f_used = "1.2.1.2.1.1.3";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if (y_vzd >= 30) {
if ((((target._x - _x) > 300) && (power < 50)) && (rotace < 110)) {
_local1.z_f_used = "1.2.1.2.1.1.4.1";
p_power = p_power + ((x_vzd / (vzd_koef / 3)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
} else if ((rot_r - (_local1.vitr / 7)) < rotace) {
if (p_rotace <= 135) {
_local1.z_f_used = "1.2.1.2.1.1.4.2.1";
p_power = p_power + ((((((x_vzd / (vzd_koef * 2)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + (y_vzd / y_vzd_koef)) + ((135 - rotace) / 8)) - (_local1.vitr / 15)) + ((rotace - (rot_r - (_local1.vitr / 7))) / 8));
} else {
_local1.z_f_used = "1.2.1.2.1.1.4.2.2";
p_power = p_power + ((((x_vzd / (vzd_koef * 2)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + (y_vzd / y_vzd_koef)) - (_local1.vitr / 15));
}
p_rotace = p_rotace - (((rotace - (rot_r - (_local1.vitr / 7))) / 4.5) + (y_vzd / y_vzd_koef));
}
}
} else if ((((((((target._y - _y) < 70) && (y_vzd < 100)) && (y_vzd > 20)) && (last_shot_vzd < 100)) && (target_vzd > 250)) && (power > 30)) && ((rot_r - (_local1.vitr / 7)) < rotace)) {
_local1.z_f_used = "1.2.1.2.1.2.1";
p_rotace = p_rotace - ((((rotace - (rot_r - (_local1.vitr / 7))) / 4.5) + (_local1.vitr / 20)) - (target_vzd / 100));
} else if (rotace < (rot_r - (_local1.vitr / 7))) {
_local1.z_f_used = "1.2.1.2.1.2.2";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if ((y_vzd < 30) && (x_vzd < 200)) {
_local1.z_f_used = "1.2.1.2.1.2.3";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if (y_vzd >= 30) {
if (((target._y - _y) > 200) && (_y < last_shot_y)) {
_local1.z_f_used = "1.2.1.2.1.2.4.1";
if (p_rotace > 120) {
_local1.z_f_used = "1.2.1.2.1.2.4.1.1";
p_power = p_power + ((x_vzd / (vzd_koef / 1.5)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
} else {
_local1.z_f_used = "1.2.1.2.1.2.4.1.2";
p_power = p_power + ((x_vzd / (vzd_koef / 2)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
}
} else if ((((target._x - _x) > 300) && (power < 50)) && (rotace < 110)) {
_local1.z_f_used = "1.2.1.2.1.2.4.2.";
p_power = p_power + ((x_vzd / (vzd_koef / 3)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
} else if ((rot_r - (_local1.vitr / 7)) < rotace) {
if (p_rotace <= 135) {
_local1.z_f_used = "1.2.1.2.1.2.4.3.1.";
p_power = p_power + ((((((x_vzd / (vzd_koef * 2)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) - (y_vzd / y_vzd_koef)) + ((135 - rotace) / 8)) - (_local1.vitr / 15)) + ((rotace - (rot_r - (_local1.vitr / 7))) / 8));
} else {
_local1.z_f_used = "1.2.1.2.1.2.4.3.2.";
p_power = p_power + ((((x_vzd / (vzd_koef * 2)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) - (y_vzd / y_vzd_koef)) - (_local1.vitr / 15));
}
p_rotace = p_rotace - (((rotace - (rot_r - (_local1.vitr / 7))) / 4.5) + (y_vzd / y_vzd_koef));
}
}
} else if ((((last_shot_vzd < 150) && ((target._x - _x) < 170)) || (last_shot_vzd >= 100)) || ((last_shot_vzd < 100) && (power < 30))) {
if (target._y < _y) {
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
_local1.z_f_used = "1.2.1.2.2.1.1";
} else if ((target._y - _y) > 100) {
_local1.z_f_used = "1.2.1.2.2.1.2.1";
p_power = p_power + ((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
} else {
_local1.z_f_used = "1.2.1.2.2.1.2.2";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
}
} else if (rotace < ((rot_r - 5) - (root.vitr / 7))) {
_local1.z_f_used = "1.2.1.2.2.2";
p_rotace = p_rotace + ((((135 - rotace) / 10) + target._x) - (_x / 100));
} else {
_local1.z_f_used = "1.2.1.2.2.3";
p_rotace = p_rotace - ((rotace - (rot_r - (_local1.vitr / 7))) / 2);
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) / 1.5) + ((rotace - (rot_r - (_local1.vitr / 7))) / 5));
}
} else if (((_y - target._y) > 100) && ((target._x - _x) < 100)) {
_local1.z_f_used = "1.2.2.1";
p_rotace = p_rotace - ((rotace - (rot_r - (_local1.vitr / 7))) / 2);
} else {
_local1.z_f_used = "1.2.2.2";
p_rotace = p_rotace - (((rotace - (rot_r - (_local1.vitr / 7))) / 2) - ((target._x - _x) / 100));
}
} else {
wind_koef_vzd_koef = wind_koef_vzd_koef - (rotace * 3);
y_koef = y_koef + ((rotace - 45) * 1.7);
if (_x < last_shot_x) {
_local1.z_f_used = "2.1";
p_rotace = p_rotace - ((((last_shot_x - _x) / 10) + ((_x - target._x) / 20)) + (_local1.vitr / 50));
} else if ((((last_shot_vzd > 60) || (target_vzd < 70)) || (power < 10)) && ((power < 70) || (last_shot_vzd > 200))) {
_local1.z_f_used = "2.2.1.failed";
if (target._x >= last_shot_x) {
if (x_vzd > 20) {
_local1.z_f_used = "2.2.1.1.1";
p_power = p_power - (((x_vzd / ((vzd_koef + 2.5) - (Math.abs(45 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) - ((last_shot_y - target._y) / y_koef));
} else {
_local1.z_f_used = "2.2.1.1.2";
p_power = p_power - ((x_vzd / ((vzd_koef - 1) - (Math.abs(45 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
}
} else if (last_shot_y < target._y) {
if (target._y < _y) {
if ((((((((_y - target._y) > 80) && (y_vzd < 80)) && (y_vzd > 20)) && (last_shot_vzd < 100)) && (target_vzd > 220)) && (power > 30)) && ((rot_l + (_local1.vitr / 7)) < rotace)) {
_local1.z_f_used = "2.2.1.2.1.1.1";
p_rotace = p_rotace + (((((rot_l + (_local1.vitr / 7)) - rotace) / 4) - (_local1.vitr / 20)) - (target_vzd / 100));
} else if ((rot_l + (_local1.vitr / 7)) < rotace) {
_local1.z_f_used = "2.2.1.2.1.1.2";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(rotace - 45) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(_x - last_shot_x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if ((y_vzd < 30) && (x_vzd < 200)) {
_local1.z_f_used = "2.2.1.2.1.1.3";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(rotace - 45) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(_x - last_shot_x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if (y_vzd >= 30) {
if ((((_x - target._x) > 300) && (power < 50)) && (rotace > 70)) {
_local1.z_f_used = "2.2.1.2.1.1.4.1";
p_power = p_power + ((x_vzd / (vzd_koef / 3)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(_x - last_shot_x) / wind_koef_vzd_koef))));
} else if (rotace < (rot_l + (_local1.vitr / 7))) {
if (p_rotace >= 45) {
_local1.z_f_used = "2.2.1.2.1.1.4.2.1";
p_power = p_power + ((((((x_vzd / (vzd_koef * 2)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + (y_vzd / y_vzd_koef)) + ((rotace - 45) / 8)) + (_local1.vitr / 15)) + (((rot_l + (_local1.vitr / 7)) - rotace) / 8));
} else {
_local1.z_f_used = "2.2.1.2.1.1.4.2.2";
p_power = p_power + ((((x_vzd / (vzd_koef * 2)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + (y_vzd / y_vzd_koef)) + (_local1.vitr / 15));
}
p_rotace = p_rotace + ((((rot_l + (_local1.vitr / 7)) - rotace) / 4.5) + (y_vzd / y_vzd_koef));
}
}
} else if ((((((((target._y - _y) < 70) && (y_vzd < 100)) && (y_vzd > 20)) && (last_shot_vzd < 100)) && (target_vzd > 250)) && (power > 30)) && (rotace < (rot_l - (_local1.vitr / 7)))) {
_local1.z_f_used = "2.2.1.2.1.2.1";
p_rotace = p_rotace + (((((rot_l + (_local1.vitr / 7)) - rotace) / 4.5) - (_local1.vitr / 20)) - (target_vzd / 100));
} else if ((rot_l + (_local1.vitr / 7)) < rotace) {
_local1.z_f_used = "2.2.1.2.1.2.2";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(rotace - 45) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(_x - last_shot_x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if ((y_vzd < 30) && (x_vzd < 200)) {
_local1.z_f_used = "2.2.1.2.1.2.3";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(45 - rotace) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if (y_vzd >= 30) {
if (((target._y - _y) > 200) && (_y < last_shot_y)) {
if (p_rotace < 60) {
_local1.z_f_used = "2.2.1.2.1.2.4.1.1";
p_power = p_power + ((x_vzd / (vzd_koef / 1.5)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
} else {
_local1.z_f_used = "2.2.1.2.1.2.4.1.2";
p_power = p_power + ((x_vzd / (vzd_koef / 2)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
}
} else if ((((_x - target._x) > 300) && (power < 50)) && (rotace > 70)) {
_local1.z_f_used = "2.2.1.2.1.2.4.2";
p_power = p_power + ((x_vzd / (vzd_koef / 3)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
} else if (rotace < (rot_l + (_local1.vitr / 7))) {
if (p_rotace >= 45) {
_local1.z_f_used = "2.2.1.2.1.2.4.3.1";
p_power = p_power + ((((((x_vzd / (vzd_koef * 2)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + (y_vzd / y_vzd_koef)) + ((rotace - 45) / 8)) + (_local1.vitr / 15)) + (((rot_l + (_local1.vitr / 7)) - rotace) / 8));
} else {
_local1.z_f_used = "2.2.1.2.1.2.4.3.2";
p_power = p_power + ((((x_vzd / (vzd_koef * 2)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + (y_vzd / y_vzd_koef)) + (_local1.vitr / 15));
}
p_rotace = p_rotace + ((((rot_l + (_local1.vitr / 7)) - rotace) / 4.5) + (y_vzd / y_vzd_koef));
}
}
} else if ((((last_shot_vzd < 150) && ((_x - target._x) < 170)) || (last_shot_vzd >= 100)) || ((last_shot_vzd < 100) && (power < 30))) {
if (target._y < _y) {
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(rotace - 45) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
_local1.z_f_used = "2.2.1.2.2.1.1";
} else if ((target._y - _y) > 100) {
_local1.z_f_used = "2.2.1.2.2.1.2.1";
p_power = p_power + ((x_vzd / (vzd_koef - (Math.abs(rotace - 45) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
} else {
_local1.z_f_used = "2.2.1.2.2.1.2.2";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(rotace - 45) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
}
} else if (((rot_l + 5) + (root.vitr / 7)) < rotace) {
_local1.z_f_used = "2.2.1.2.2.2";
p_rotace = p_rotace - ((((rotace - 45) / 10) + _x) - (target._x / 100));
} else {
_local1.z_f_used = "2.2.1.2.2.3";
p_rotace = p_rotace + (((rot_l + (_local1.vitr / 7)) - rotace) / 3);
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(rotace - 45) / vzd_koef_k))) / 1.5) + (((rot_l + (_local1.vitr / 7)) - rotace) / 5));
}
} else if (((_y - target._y) > 100) && ((_x - target._x) < 100)) {
_local1.z_f_used = "2.2.2.1";
p_rotace = p_rotace + (((rot_l + (_local1.vitr / 7)) - rotace) / 2);
} else {
_local1.z_f_used = "2.2.2.2";
p_rotace = p_rotace + ((((rot_l + (_local1.vitr / 7)) - rotace) / 2) - ((target._x - _x) / 100));
}
}
if (p_power > 100) {
p_power = 100;
}
if (p_power >= _local1["tank_" + tank_number].energy) {
p_power = _local1["tank_" + tank_number].energy;
if (_x < target._x) {
if (p_rotace < 135) {
if (p_power > 70) {
p_power = p_power - ((135 - p_rotace) / 2.5);
}
p_rotace = p_rotace + ((135 - p_rotace) / 3);
}
} else if (p_rotace > 45) {
if (p_power > 70) {
p_power = p_power - ((p_rotace - 45) / 2.5);
}
p_rotace = p_rotace - ((p_rotace - 45) / 3);
}
}
if (p_power < 0) {
p_power = 0;
}
if (p_rotace < 0) {
p_rotace = 0;
} else if (p_rotace > 180) {
p_rotace = 180;
}
}
function prepare_shot() {
var _local1 = _root;
prep = true;
if ((Math.max(rotace, p_rotace) - Math.min(rotace, p_rotace)) < 10) {
sp = 1;
} else {
sp = Math.floor((Math.max(rotace, p_rotace) - Math.min(rotace, p_rotace)) / 10);
}
if (Math.ceil(rotace) != Math.ceil(p_rotace)) {
if ((Math.ceil(p_rotace) < Math.ceil(rotace)) && ((rotace - sp) >= 0)) {
prep = false;
rotace = rotace - sp;
_local1.tur.play();
} else if ((rotace + sp) <= 180) {
prep = false;
rotace = rotace + sp;
_local1.tur.play();
}
}
if (Math.ceil(power) != Math.ceil(p_power)) {
if ((Math.ceil(p_power) < Math.ceil(power)) && ((power - sp) >= 0)) {
prep = false;
power = power - sp;
} else if ((power + sp) <= 180) {
prep = false;
power = power + sp;
}
}
if (((Math.round(p_x) != Math.round(_x)) && (_local1["tank_" + tank_number].fuel > 0)) && (p_move)) {
prep = false;
if (Math.round(p_x) < Math.round(_x)) {
move_right();
} else {
move_left();
}
}
if (prep) {
return(true);
}
return(undefined);
}
function select_target() {
var _local1 = _root;
vzd = 1000;
i = 1;
while (_local1.pocet_hracu >= i) {
vz = Math.abs(_x - _local1["tank" + i]._x);
if (((vz < vzd) && (i != tank_number)) && (_local1["tank_" + i].live)) {
vzd = vz;
target = _local1["tank" + i];
target_ = _local1["tank_" + i];
}
i++;
}
}
function na_rade() {
rounds++;
par_active = false;
calc_hill_up();
}
function damage(damag, attacker, par) {
var _local1 = _root;
var _local2 = attacker;
var _local3 = damag;
armor = 1;
arm = 1;
i = 0;
while (i < _local1["tank_" + tank_number].specials[9]) {
armor = armor / (1.12 / arm);
arm = arm / 1.0002;
i++;
}
if ((!sh_active) || (par)) {
_local1["tank_" + tank_number].energy = _local1["tank_" + tank_number].energy - (_local3 * armor);
} else {
_local1["shield" + tank_number].damage(_local3, _local2);
}
if (_local1["tank_" + tank_number].energy <= 0) {
if (this != _local2) {
_local1["tank_" + _local2.tank_number].kills = _local1["tank_" + _local2.tank_number].kills + 1;
_local1["tank_" + _local2.tank_number].score = _local1["tank_" + _local2.tank_number].score + 5000;
_local1["tank_" + _local2.tank_number].total_score = _local1["tank_" + _local2.tank_number].total_score + 5000;
} else {
_local1["tank_" + tank_number].kills = _local1["tank_" + tank_number].kills - 1;
_local1["tank_" + tank_number].score = _local1["tank_" + tank_number].score - 2000;
_local1["tank_" + tank_number].total_score = _local1["tank_" + tank_number].total_score - 2000;
}
}
if (this != _local2) {
_local1["tank_" + _local2.tank_number].score = _local1["tank_" + _local2.tank_number].score + (_local3 * 100);
_local1["tank_" + _local2.tank_number].total_score = _local1["tank_" + _local2.tank_number].total_score + (_local3 * 100);
} else {
if (par) {
_local3 = _local3 / 3;
}
_local1["tank_" + tank_number].score = _local1["tank_" + tank_number].score - Math.round(_local3 * 50);
_local1["tank_" + tank_number].total_score = _local1["tank_" + tank_number].total_score - Math.round(_local3 * 50);
if (_local1["tank_" + tank_number].score < 0) {
_local1["tank_" + tank_number].score = 0;
}
}
}
function fire() {
var _local1 = _root;
if (_local1.debugging) {
save_inf();
}
last_wind = _local1.vitr;
first_frame = true;
_local1.attachMovie(_local1.weapons[_local1["tank_" + tank_number].cur_gun][4], "strela", 1000);
if (_local1["tank_" + tank_number].cur_gun != 0) {
_local1["tank_" + tank_number].guns[_local1["tank_" + tank_number].cur_gun]--;
if (_local1["tank_" + tank_number].guns[_local1["tank_" + tank_number].cur_gun] == 0) {
_local1["tank_" + tank_number].cur_gun = 0;
}
}
_local1.strela._rotation = rotace - 90;
_local1.strela._x = _x;
_local1.strela._y = _y - 1;
_local1.strela.strela.vo = power;
_local1.strela.strela.owner = _local1[_name];
_local1[_name + "_hlaven"].play();
playing = false;
}
function save_inf() {
var _local1 = _root;
_local1.z_target = target;
_local1.z_target_name = target_.name;
_local1.z_target_energy = target_.energy;
_local1.z_target_live = target_.live;
_local1.z_name = _local1["tank_" + tank_number].name;
_local1.z_energy = _local1["tank_" + tank_number].energy;
if (target._x < _x) {
_local1.z_pos = "right";
} else {
_local1.z_pos = "left";
}
_local1.z_x = _x;
_local1.z_y = _y;
_local1.z_tar_x = target._x;
_local1.z_tar_y = target._y;
_local1.z_last_vitr = last_wind;
_local1.z_vitr = _local1.vitr;
_local1.z_wind_koef_vzd_koef = wind_koef_vzd_koef;
_local1.z_angle = rotace;
_local1.z_power = power;
_local1.z_y_koef = y_koef;
_local1.z_vzd_koef_k = vzd_koef_k;
_local1.z_last_shot_x = last_shot_x;
_local1.z_last_shot_y = last_shot_y;
_local1.z_last_shot_vzd = last_shot_vzd;
_local1.z_last_shot_y_vzd = y_vzd;
_local1.z_last_shot_x_vzd = x_vzd;
_local1.z_dif = dif;
fscommand ("SAVE", ((((((("debug/" add _local1.game) add "_") add rounds) add "_") add _local1.z_pos) add "_") add _local1["tank_" + tank_number].name) add ".txt");
}
dif = _root["tank_" + tank_number].dif;
_y = ((_root["land" + Math.round(_x)]._y - (_root["land" + Math.round(_x)]._height / 2)) - 4);
i = 0;
while (i < _width) {
cur = _root["land" + Math.floor((_x - (_width / 2)) + i)];
if (hitTest(cur)) {
cur._y = cur._y + ((_y + (_height / 2)) - (cur._y - (cur._height / 2)));
}
i++;
}
if (_root["tank_" + tank_number].specials[0] > 0) {
par = true;
}
_root.attachMovie("hlaven", _name + "_hlaven", 10010 + tank_number);
rotace = (random(67) * 2) + 46;
_root[_name + "_hlaven"]._x = _x;
_root[_name + "_hlaven"]._y = _y - 1;
_root[_name + "_hlaven"]._rotation = rotace;
power = 50;
playing = false;
testing = false;
par_active = false;
par_out = false;
par_used = false;
sh_active = false;
_root["t" + tank_number] = _root["tank" + tank_number];
first_shot = true;
first_frame = true;
calc_frame = true;
fuel_c = 1 / (_root["tank_" + tank_number].specials[10] + 1);
rounds = 0;
p_move = false;
select_target();
Symbol 301 MovieClip [ai_very_hard] Frame 2
if (_y > 400) {
_root["tank_" + tank_number].live = false;
_root["tank_" + tank_number].energy = 0;
_root["tank_" + tank_number].score = _root["tank_" + tank_number].score - 2000;
_root.hracu--;
if (_root["tank_" + tank_number].score < 0) {
_root["tank_" + tank_number].score = 0;
}
gotoAndPlay (4);
}
if (_root["tank_" + tank_number].energy <= 0) {
_root["tank_" + tank_number].energy = 0;
_root["tank_" + tank_number].live = false;
gotoAndPlay (4);
}
_root[_name + "_hlaven"]._x = _x;
_root[_name + "_hlaven"]._y = _y - 1;
if (sh_active) {
_root["shield" + tank_number]._x = _x;
_root["shield" + tank_number]._y = _y;
}
if (playing) {
if ((!target_.live) && (first_frame)) {
rounds = 1;
select_target();
}
if (rounds == 1) {
if (first_frame) {
i = 1;
while (_root.pocet_hracu >= i) {
if ((_root["tank" + i].playing && (i != tank_number)) && (_root["tank_" + i].live)) {
_root["tank" + i].playing = false;
_root.test();
}
i++;
}
first_shot = true;
calc_first_shot();
}
} else if (first_frame) {
calc_shot();
}
first_frame = false;
_root.rotace = rotace;
_root.power = power;
if (prepare_shot()) {
fire();
}
na_zemi = false;
left = true;
right = true;
i = 0;
min = 500;
gg = false;
test_hill();
while (i < _width) {
cur = _root["land" + Math.round((_x - (_width / 2)) + i)];
if (pasy.hitTest(cur)) {
na_zemi = true;
if (par_out) {
par_out = false;
_root["parachute" + tank_number].removeMovieClip();
}
if (fall > 0.4) {
if (fall < 0.8) {
damage(Math.round(fall * 25), this, true);
} else {
damage(Math.round((fall * fall) * 3000), this, true);
}
}
fall = 0;
}
top = cur._y - (cur._height / 2);
if ((top < min) && (na_zemi)) {
gg = true;
min = top;
}
if ((((i + 1) >= _width) && (na_zemi)) && (gg)) {
_y = (min - 2);
gg = false;
}
if (!na_zemi) {
if ((fall >= 0.2) && (par)) {
if (!par_active) {
par_active = true;
_root["tank_" + i].specials[0] = _root["tank_" + i].specials[0] - 1;
}
if (!par_out) {
_root.attachMovie("parachute", "parachute" + tank_number, 9000 + tank_number);
}
par_out = true;
}
_y = (_y + fall);
if (!par_out) {
fall = fall + 0.01;
} else {
_root["parachute" + tank_number]._x = _x;
_root["parachute" + tank_number]._y = _y - 7.5;
fall = 0.2;
_x = (_x + (_root.vitr / 3000));
}
}
i++;
}
if (_root["tank_" + tank_number].energy < power) {
power = _root["tank_" + tank_number].energy;
}
_root[_name + "_hlaven"]._rotation = rotace;
}
if (testing) {
i = 0;
min = 500;
gg = false;
test_hill();
while (i < _width) {
cur = _root["land" + Math.round((_x - (_width / 2)) + i)];
if (pasy.hitTest(cur)) {
if (fall > 0.4) {
if (fall < 0.8) {
damage(Math.round(fall * 25), this, true);
} else {
damage(Math.round((fall * fall) * 80), this, true);
}
}
if (par_out) {
par_out = false;
_root["parachute" + tank_number].removeMovieClip();
}
na_zemi = true;
fall = 0;
}
top = cur._y - (cur._height / 2);
if ((top < min) && (na_zemi)) {
gg = true;
min = top;
}
if ((((i + 1) >= _width) && (na_zemi)) && (gg)) {
_y = (min - 2);
gg = false;
}
if (fall > 0.001) {
test = false;
}
if (!na_zemi) {
if ((fall >= 0.2) && (par)) {
if (!par_active) {
par_active = true;
_root["tank_" + tank_number].specials[0] = _root["tank_" + tank_number].specials[0] - 1;
}
if (!par_out) {
_root.attachMovie("parachute", "parachute" + tank_number, 9000 + tank_number);
}
par_out = true;
}
_y = (_y + fall);
if (!par_out) {
fall = fall + 0.01;
} else {
_root["parachute" + tank_number]._x = _x;
_root["parachute" + tank_number]._y = _y - 7.5;
fall = 0.2;
_x = (_x + (_root.vitr / 3000));
}
}
i++;
}
if (fall > 0.001) {
test = false;
}
test_hill();
x3 = x2;
x2 = x1;
x1 = Math.round(_x);
y3 = y2;
y2 = y1;
y1 = Math.round(_y * 10) / 10;
if ((y1 == y3) && (x1 == x3)) {
test = true;
}
if (test) {
testing = false;
_root[_name + "test"] = false;
}
_root[_name + "_hlaven"]._x = _x;
_root[_name + "_hlaven"]._y = _y - 1;
test = true;
}
Symbol 301 MovieClip [ai_very_hard] Frame 3
gotoAndPlay (2);
Symbol 301 MovieClip [ai_very_hard] Frame 4
_root[_name + "_hlaven"].removeMovieClip();
_root["parachute" + tank_number].removeMovieClip();
_root["shield" + tank_number].removeMovieClip();
_root.hracu--;
Symbol 301 MovieClip [ai_very_hard] Frame 9
i = 0;
while (i < _width) {
cur = _root["land" + Math.round((_x - (_width / 2)) + i)];
x = cur._x;
y = cur._y;
h = cur._y - (cur._height / 2);
if (hitTest(x, h, true)) {
vzr = Math.cos(0.017 * (Math.sqrt(((_x - x) * (_x - x)) + ((_y - h) * (_y - h))) * (180 / _width)));
cur._height = cur._height - (30 * vzr);
cur._y = cur._y + (15 * vzr);
} else if (hitTest(_root["land" + Math.round((xx - (_width / 2)) + i)])) {
cur._height = cur._height - (50 / Math.abs(_x - x));
cur._y = cur._y + ((50 / Math.abs(_x - x)) / 2);
}
i++;
}
i = 1;
while (_root.pocet_hracu >= i) {
current = _root["tank" + i];
if ((hitTest(current) || (hitTest(_root["shield" + i]))) && (i != tank_number)) {
x = _x - current._x;
y = _y - current._y;
vzd = Math.sqrt((x * x) + (y * y));
if (!current.sh_active) {
damg = Math.round(_width / ((vzd + 1) / 14));
if (_root["tank_" + i].energy < damg) {
damg = _root["tank_" + i].energy;
}
} else {
damg = Math.round(_width / (((vzd / 2) + 1) / 18));
}
current.damage(damg, this);
}
i++;
}
Symbol 301 MovieClip [ai_very_hard] Frame 15
if (playing) {
_root.test();
}
stop();
Symbol 304 MovieClip [ai_hard] Frame 1
function test_hill() {
var _local1 = _root;
calc_hill_up();
if (((_local1["land" + Math.ceil(_x - (_width / 2))]._y - (_local1["land" + Math.ceil(_x - (_width / 2))]._height / 2)) < (_y - hill_up)) || ((_local1["land" + Math.floor(_x - (_width / 2))]._y - (_local1["land" + Math.floor(_x - (_width / 2))]._height / 2)) < (_y - hill_up))) {
_x = (_x + 0.7);
test = false;
left = false;
right = false;
} else if (((_local1["land" + Math.floor(_x + (_width / 2))]._y - (_local1["land" + Math.floor(_x + (_width / 2))]._height / 2)) < (_y - hill_up)) || ((_local1["land" + Math.ceil(_x + (_width / 2))]._y - (_local1["land" + Math.ceil(_x + (_width / 2))]._height / 2)) < (_y - hill_up))) {
left = false;
right = false;
_x = (_x - 0.7);
test = false;
} else {
left = true;
right = true;
}
}
function blik() {
var _local1 = _root;
_local1.attachMovie("blk", "blik", 10030);
_local1.blik._x = _x;
_local1.blik._y = _y - 10;
}
function calc_hill_up() {
hill_up = (0.5 + _root["tank_" + tank_number].specials[11]) - (fall * 10);
}
function move_left() {
var _local1 = _root;
_x = (_x - 0.5);
_local1["tank_" + tank_number].fuel = _local1["tank_" + tank_number].fuel - fuel_c;
moving = true;
i = 1;
while (i < (_local1.pocet_hracu + 1)) {
if (hitTest(_local1["tank" + i]) && (i != tank_number)) {
_x = (_x + 0.6);
}
i++;
}
}
function move_right() {
var _local1 = _root;
_x = (_x + 0.5);
_local1["tank_" + tank_number].fuel = _local1["tank_" + tank_number].fuel - fuel_c;
moving = true;
i = 1;
while (i < (_local1.pocet_hracu + 1)) {
if (hitTest(_local1["tank" + i]) && (i != tank_number)) {
_x = (_x - 0.6);
}
i++;
}
}
function activate_shield(shield) {
var _local1 = _root;
_local1.attachMovie(_local1.specials[2 + shield][4], "shield" + tank_number, 5040 + tank_number);
_local1["shield" + tank_number].num = tank_number;
_local1["tank_" + tank_number].specials[2 + shield]--;
sh_active = true;
_local1["t" + tank_number] = _local1["shield" + tank_number];
}
function disable_shield() {
var _local1 = _root;
_local1["shield" + tank_number].disable();
sh_active = false;
_local1["t" + tank_number] = _local1["tank" + tank_number];
}
function p_m(par) {
if (par > 0) {
return(1);
}
return(-1);
}
function calc_first_shot() {
var _local1 = _root;
_local1.z_ai_dif = "hard";
p_rotace = 90 + (p_m(target._x - _x) * 45);
p_x = _x;
p_power = Math.abs(_x - target._x) / (2 + (Math.abs(_x - target._x) / 80));
if (p_power >= _local1["tank_" + tank_number].energy) {
p_power = _local1["tank_" + tank_number].energy;
}
}
function calc_shot() {
var _local1 = _root;
last_shot_vzd = Math.sqrt(Math.abs((_x - last_shot_x) * (_x - last_shot_x)) + Math.abs((_y - last_shot_y) * (_y - last_shot_y)));
target_vzd = Math.sqrt(Math.abs((_x - target._x) * (_x - target._x)) + Math.abs((_y - target._y) * (_y - target._y)));
x_vzd = Math.abs(last_shot_x - target._x);
y_vzd = Math.abs(last_shot_y - target._y);
if ((power >= _local1["tank_" + tank_number].energy) || (power == 100)) {
full_power = true;
} else {
full_power = false;
}
wind_change_koef = 11;
wind_koef_vzd_koef = 420;
vzd_koef = 14;
vzd_koef_k = 9 + (Math.abs(_x - last_shot_x) / 80);
y_vzd_koef = 40;
y_koef = 30;
rot_r = 102 - ((200 - Math.abs(_x - target._x)) / 30);
rot_l = 78 + ((200 - Math.abs(_x - target._x)) / 30);
if (_x < target._x) {
wind_koef_vzd_koef = wind_koef_vzd_koef - ((180 - rotace) * 3);
y_koef = y_koef + ((135 - rotace) * 1.7);
if (last_shot_x < _x) {
_local1.z_f_used = "1.1";
p_rotace = p_rotace + ((((_x - last_shot_x) / 10) + ((target._x - _x) / 20)) - (_local1.vitr / 50));
} else if ((((last_shot_vzd > 60) || (target_vzd < 70)) || (power < 10)) && ((power < 70) || (last_shot_vzd > 200))) {
_local1.z_f_used = "1.2.1.failed";
if (last_shot_x >= target._x) {
if (x_vzd > 20) {
_local1.z_f_used = "1.2.1.1.1";
p_power = p_power - (((x_vzd / ((vzd_koef + 2.5) - (Math.abs(135 - rotace) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) - ((last_shot_y - target._y) / y_koef));
} else {
_local1.z_f_used = "1.2.1.1.2";
p_power = p_power - ((x_vzd / ((vzd_koef - 1) - (Math.abs(135 - rotace) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
}
} else if (last_shot_y < target._y) {
if (target._y < _y) {
if ((((((((_y - target._y) > 80) && (y_vzd < 80)) && (y_vzd > 20)) && (last_shot_vzd < 100)) && (target_vzd > 220)) && (power > 30)) && ((rot_r - (_local1.vitr / 7)) < rotace)) {
_local1.z_f_used = "1.2.1.2.1.1.1";
p_rotace = p_rotace - ((((rotace - (rot_r - (_local1.vitr / 7))) / 4) + (_local1.vitr / 20)) - (target_vzd / 100));
} else if (rotace < (rot_r - (_local1.vitr / 7))) {
_local1.z_f_used = "1.2.1.2.1.1.2.";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if ((y_vzd < 30) && (x_vzd < 200)) {
_local1.z_f_used = "1.2.1.2.1.1.3";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if (y_vzd >= 30) {
if ((((target._x - _x) > 300) && (power < 50)) && (rotace < 110)) {
_local1.z_f_used = "1.2.1.2.1.1.4.1";
p_power = p_power + ((x_vzd / (vzd_koef / 3)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
} else if ((rot_r - (_local1.vitr / 7)) < rotace) {
if (p_rotace <= 135) {
_local1.z_f_used = "1.2.1.2.1.1.4.2.1";
p_power = p_power + ((((((x_vzd / (vzd_koef * 2)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + (y_vzd / y_vzd_koef)) + ((135 - rotace) / 8)) - (_local1.vitr / 15)) + ((rotace - (rot_r - (_local1.vitr / 7))) / 8));
} else {
_local1.z_f_used = "1.2.1.2.1.1.4.2.2";
p_power = p_power + ((((x_vzd / (vzd_koef * 2)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + (y_vzd / y_vzd_koef)) - (_local1.vitr / 15));
}
p_rotace = p_rotace - (((rotace - (rot_r - (_local1.vitr / 7))) / 4.5) + (y_vzd / y_vzd_koef));
}
}
} else if ((((((((target._y - _y) < 70) && (y_vzd < 100)) && (y_vzd > 20)) && (last_shot_vzd < 100)) && (target_vzd > 250)) && (power > 30)) && ((rot_r - (_local1.vitr / 7)) < rotace)) {
_local1.z_f_used = "1.2.1.2.1.2.1";
p_rotace = p_rotace - ((((rotace - (rot_r - (_local1.vitr / 7))) / 4.5) + (_local1.vitr / 20)) - (target_vzd / 100));
} else if (rotace < (rot_r - (_local1.vitr / 7))) {
_local1.z_f_used = "1.2.1.2.1.2.2";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if ((y_vzd < 30) && (x_vzd < 200)) {
_local1.z_f_used = "1.2.1.2.1.2.3";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if (y_vzd >= 30) {
if (((target._y - _y) > 200) && (_y < last_shot_y)) {
_local1.z_f_used = "1.2.1.2.1.2.4.1";
if (p_rotace > 120) {
_local1.z_f_used = "1.2.1.2.1.2.4.1.1";
p_power = p_power + ((x_vzd / (vzd_koef / 1.5)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
} else {
_local1.z_f_used = "1.2.1.2.1.2.4.1.2";
p_power = p_power + ((x_vzd / (vzd_koef / 2)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
}
} else if ((((target._x - _x) > 300) && (power < 50)) && (rotace < 110)) {
_local1.z_f_used = "1.2.1.2.1.2.4.2.";
p_power = p_power + ((x_vzd / (vzd_koef / 3)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
} else if ((rot_r - (_local1.vitr / 7)) < rotace) {
if (p_rotace <= 135) {
_local1.z_f_used = "1.2.1.2.1.2.4.3.1.";
p_power = p_power + ((((((x_vzd / (vzd_koef * 2)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) - (y_vzd / y_vzd_koef)) + ((135 - rotace) / 8)) - (_local1.vitr / 15)) + ((rotace - (rot_r - (_local1.vitr / 7))) / 8));
} else {
_local1.z_f_used = "1.2.1.2.1.2.4.3.2.";
p_power = p_power + ((((x_vzd / (vzd_koef * 2)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) - (y_vzd / y_vzd_koef)) - (_local1.vitr / 15));
}
p_rotace = p_rotace - (((rotace - (rot_r - (_local1.vitr / 7))) / 4.5) + (y_vzd / y_vzd_koef));
}
}
} else if ((((last_shot_vzd < 150) && ((target._x - _x) < 170)) || (last_shot_vzd >= 100)) || ((last_shot_vzd < 100) && (power < 30))) {
if (target._y < _y) {
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
_local1.z_f_used = "1.2.1.2.2.1.1";
} else if ((target._y - _y) > 100) {
_local1.z_f_used = "1.2.1.2.2.1.2.1";
p_power = p_power + ((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
} else {
_local1.z_f_used = "1.2.1.2.2.1.2.2";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
}
} else if (rotace < ((rot_r - 5) - (root.vitr / 7))) {
_local1.z_f_used = "1.2.1.2.2.2";
p_rotace = p_rotace + ((((135 - rotace) / 10) + target._x) - (_x / 100));
} else {
_local1.z_f_used = "1.2.1.2.2.3";
p_rotace = p_rotace - ((rotace - (rot_r - (_local1.vitr / 7))) / 2);
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) / 1.5) + ((rotace - (rot_r - (_local1.vitr / 7))) / 5));
}
} else if (((_y - target._y) > 100) && ((target._x - _x) < 100)) {
_local1.z_f_used = "1.2.2.1";
p_rotace = p_rotace - ((rotace - (rot_r - (_local1.vitr / 7))) / 2);
} else {
_local1.z_f_used = "1.2.2.2";
p_rotace = p_rotace - (((rotace - (rot_r - (_local1.vitr / 7))) / 2) - ((target._x - _x) / 100));
}
} else {
wind_koef_vzd_koef = wind_koef_vzd_koef - (rotace * 3);
y_koef = y_koef + ((rotace - 45) * 1.7);
if (_x < last_shot_x) {
_local1.z_f_used = "2.1";
p_rotace = p_rotace - ((((last_shot_x - _x) / 10) + ((_x - target._x) / 20)) + (_local1.vitr / 50));
} else if ((((last_shot_vzd > 60) || (target_vzd < 70)) || (power < 10)) && ((power < 70) || (last_shot_vzd > 200))) {
_local1.z_f_used = "2.2.1.failed";
if (target._x >= last_shot_x) {
if (x_vzd > 20) {
_local1.z_f_used = "2.2.1.1.1";
p_power = p_power - (((x_vzd / ((vzd_koef + 2.5) - (Math.abs(45 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) - ((last_shot_y - target._y) / y_koef));
} else {
_local1.z_f_used = "2.2.1.1.2";
p_power = p_power - ((x_vzd / ((vzd_koef - 1) - (Math.abs(45 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
}
} else if (last_shot_y < target._y) {
if (target._y < _y) {
if ((((((((_y - target._y) > 80) && (y_vzd < 80)) && (y_vzd > 20)) && (last_shot_vzd < 100)) && (target_vzd > 220)) && (power > 30)) && ((rot_l + (_local1.vitr / 7)) < rotace)) {
_local1.z_f_used = "2.2.1.2.1.1.1";
p_rotace = p_rotace + (((((rot_l + (_local1.vitr / 7)) - rotace) / 4) - (_local1.vitr / 20)) - (target_vzd / 100));
} else if ((rot_l + (_local1.vitr / 7)) < rotace) {
_local1.z_f_used = "2.2.1.2.1.1.2";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(rotace - 45) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(_x - last_shot_x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if ((y_vzd < 30) && (x_vzd < 200)) {
_local1.z_f_used = "2.2.1.2.1.1.3";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(rotace - 45) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(_x - last_shot_x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if (y_vzd >= 30) {
if ((((_x - target._x) > 300) && (power < 50)) && (rotace > 70)) {
_local1.z_f_used = "2.2.1.2.1.1.4.1";
p_power = p_power + ((x_vzd / (vzd_koef / 3)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(_x - last_shot_x) / wind_koef_vzd_koef))));
} else if (rotace < (rot_l + (_local1.vitr / 7))) {
if (p_rotace >= 45) {
_local1.z_f_used = "2.2.1.2.1.1.4.2.1";
p_power = p_power + ((((((x_vzd / (vzd_koef * 2)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + (y_vzd / y_vzd_koef)) + ((rotace - 45) / 8)) + (_local1.vitr / 15)) + (((rot_l + (_local1.vitr / 7)) - rotace) / 8));
} else {
_local1.z_f_used = "2.2.1.2.1.1.4.2.2";
p_power = p_power + ((((x_vzd / (vzd_koef * 2)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + (y_vzd / y_vzd_koef)) + (_local1.vitr / 15));
}
p_rotace = p_rotace + ((((rot_l + (_local1.vitr / 7)) - rotace) / 4.5) + (y_vzd / y_vzd_koef));
}
}
} else if ((((((((target._y - _y) < 70) && (y_vzd < 100)) && (y_vzd > 20)) && (last_shot_vzd < 100)) && (target_vzd > 250)) && (power > 30)) && (rotace < (rot_l - (_local1.vitr / 7)))) {
_local1.z_f_used = "2.2.1.2.1.2.1";
p_rotace = p_rotace + (((((rot_l + (_local1.vitr / 7)) - rotace) / 4.5) - (_local1.vitr / 20)) - (target_vzd / 100));
} else if ((rot_l + (_local1.vitr / 7)) < rotace) {
_local1.z_f_used = "2.2.1.2.1.2.2";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(rotace - 45) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(_x - last_shot_x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if ((y_vzd < 30) && (x_vzd < 200)) {
_local1.z_f_used = "2.2.1.2.1.2.3";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(45 - rotace) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if (y_vzd >= 30) {
if (((target._y - _y) > 200) && (_y < last_shot_y)) {
if (p_rotace < 60) {
_local1.z_f_used = "2.2.1.2.1.2.4.1.1";
p_power = p_power + ((x_vzd / (vzd_koef / 1.5)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
} else {
_local1.z_f_used = "2.2.1.2.1.2.4.1.2";
p_power = p_power + ((x_vzd / (vzd_koef / 2)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
}
} else if ((((_x - target._x) > 300) && (power < 50)) && (rotace > 70)) {
_local1.z_f_used = "2.2.1.2.1.2.4.2";
p_power = p_power + ((x_vzd / (vzd_koef / 3)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
} else if (rotace < (rot_l + (_local1.vitr / 7))) {
if (p_rotace >= 45) {
_local1.z_f_used = "2.2.1.2.1.2.4.3.1";
p_power = p_power + ((((((x_vzd / (vzd_koef * 2)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + (y_vzd / y_vzd_koef)) + ((rotace - 45) / 8)) + (_local1.vitr / 15)) + (((rot_l + (_local1.vitr / 7)) - rotace) / 8));
} else {
_local1.z_f_used = "2.2.1.2.1.2.4.3.2";
p_power = p_power + ((((x_vzd / (vzd_koef * 2)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + (y_vzd / y_vzd_koef)) + (_local1.vitr / 15));
}
p_rotace = p_rotace + ((((rot_l + (_local1.vitr / 7)) - rotace) / 4.5) + (y_vzd / y_vzd_koef));
}
}
} else if ((((last_shot_vzd < 150) && ((_x - target._x) < 170)) || (last_shot_vzd >= 100)) || ((last_shot_vzd < 100) && (power < 30))) {
if (target._y < _y) {
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(rotace - 45) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
_local1.z_f_used = "2.2.1.2.2.1.1";
} else if ((target._y - _y) > 100) {
_local1.z_f_used = "2.2.1.2.2.1.2.1";
p_power = p_power + ((x_vzd / (vzd_koef - (Math.abs(rotace - 45) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
} else {
_local1.z_f_used = "2.2.1.2.2.1.2.2";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(rotace - 45) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
}
} else if (((rot_l + 5) + (root.vitr / 7)) < rotace) {
_local1.z_f_used = "2.2.1.2.2.2";
p_rotace = p_rotace - ((((rotace - 45) / 10) + _x) - (target._x / 100));
} else {
_local1.z_f_used = "2.2.1.2.2.3";
p_rotace = p_rotace + (((rot_l + (_local1.vitr / 7)) - rotace) / 3);
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(rotace - 45) / vzd_koef_k))) / 1.5) + (((rot_l + (_local1.vitr / 7)) - rotace) / 5));
}
} else if (((_y - target._y) > 100) && ((_x - target._x) < 100)) {
_local1.z_f_used = "2.2.2.1";
p_rotace = p_rotace + (((rot_l + (_local1.vitr / 7)) - rotace) / 2);
} else {
_local1.z_f_used = "2.2.2.2";
p_rotace = p_rotace + ((((rot_l + (_local1.vitr / 7)) - rotace) / 2) - ((target._x - _x) / 100));
}
}
if (p_power > 100) {
p_power = 100;
}
if (p_power >= _local1["tank_" + tank_number].energy) {
p_power = _local1["tank_" + tank_number].energy;
if (_x < target._x) {
if (p_rotace < 135) {
if (p_power > 70) {
p_power = p_power - ((135 - p_rotace) / 2.5);
}
p_rotace = p_rotace + ((135 - p_rotace) / 3);
}
} else if (p_rotace > 45) {
if (p_power > 70) {
p_power = p_power - ((p_rotace - 45) / 2.5);
}
p_rotace = p_rotace - ((p_rotace - 45) / 3);
}
}
if (p_power < 0) {
p_power = 0;
}
if (p_rotace < 0) {
p_rotace = 0;
} else if (p_rotace > 180) {
p_rotace = 180;
}
}
function prepare_shot() {
var _local1 = _root;
prep = true;
if ((Math.max(rotace, p_rotace) - Math.min(rotace, p_rotace)) < 10) {
sp = 1;
} else {
sp = Math.floor((Math.max(rotace, p_rotace) - Math.min(rotace, p_rotace)) / 10);
}
if (Math.ceil(rotace) != Math.ceil(p_rotace)) {
if ((Math.ceil(p_rotace) < Math.ceil(rotace)) && ((rotace - sp) >= 0)) {
prep = false;
rotace = rotace - sp;
_local1.tur.play();
} else if ((rotace + sp) <= 180) {
prep = false;
rotace = rotace + sp;
_local1.tur.play();
}
}
if (Math.ceil(power) != Math.ceil(p_power)) {
if ((Math.ceil(p_power) < Math.ceil(power)) && ((power - sp) >= 0)) {
prep = false;
power = power - sp;
} else if ((power + sp) <= 180) {
prep = false;
power = power + sp;
}
}
if (((Math.round(p_x) != Math.round(_x)) && (_local1["tank_" + tank_number].fuel > 0)) && (p_move)) {
prep = false;
if (Math.round(p_x) < Math.round(_x)) {
move_right();
} else {
move_left();
}
}
if (prep) {
return(true);
}
return(undefined);
}
function select_target() {
var _local1 = _root;
vzd = 1000;
i = 1;
while (_local1.pocet_hracu >= i) {
vz = Math.abs(_x - _local1["tank" + i]._x);
if (((vz < vzd) && (i != tank_number)) && (_local1["tank_" + i].live)) {
vzd = vz;
target = _local1["tank" + i];
target_ = _local1["tank_" + i];
}
i++;
}
}
function na_rade() {
rounds++;
par_active = false;
calc_hill_up();
}
function damage(damag, attacker, par) {
var _local1 = _root;
var _local2 = attacker;
var _local3 = damag;
armor = 1;
arm = 1;
i = 0;
while (i < _local1["tank_" + tank_number].specials[9]) {
armor = armor / (1.12 / arm);
arm = arm / 1.0002;
i++;
}
if ((!sh_active) || (par)) {
_local1["tank_" + tank_number].energy = _local1["tank_" + tank_number].energy - (_local3 * armor);
} else {
_local1["shield" + tank_number].damage(_local3, _local2);
}
if (_local1["tank_" + tank_number].energy <= 0) {
if (this != _local2) {
_local1["tank_" + _local2.tank_number].kills = _local1["tank_" + _local2.tank_number].kills + 1;
_local1["tank_" + _local2.tank_number].score = _local1["tank_" + _local2.tank_number].score + 5000;
_local1["tank_" + _local2.tank_number].total_score = _local1["tank_" + _local2.tank_number].total_score + 5000;
} else {
_local1["tank_" + tank_number].kills = _local1["tank_" + tank_number].kills - 1;
_local1["tank_" + tank_number].score = _local1["tank_" + tank_number].score - 2000;
_local1["tank_" + tank_number].total_score = _local1["tank_" + tank_number].total_score - 2000;
}
}
if (this != _local2) {
_local1["tank_" + _local2.tank_number].score = _local1["tank_" + _local2.tank_number].score + (_local3 * 100);
_local1["tank_" + _local2.tank_number].total_score = _local1["tank_" + _local2.tank_number].total_score + (_local3 * 100);
} else {
if (par) {
_local3 = _local3 / 3;
}
_local1["tank_" + tank_number].score = _local1["tank_" + tank_number].score - Math.round(_local3 * 50);
_local1["tank_" + tank_number].total_score = _local1["tank_" + tank_number].total_score - Math.round(_local3 * 50);
if (_local1["tank_" + tank_number].score < 0) {
_local1["tank_" + tank_number].score = 0;
}
}
}
function fire() {
var _local1 = _root;
if (_local1.debugging) {
save_inf();
}
last_wind = _local1.vitr;
first_frame = true;
_local1.attachMovie(_local1.weapons[_local1["tank_" + tank_number].cur_gun][4], "strela", 1000);
if (_local1["tank_" + tank_number].cur_gun != 0) {
_local1["tank_" + tank_number].guns[_local1["tank_" + tank_number].cur_gun]--;
if (_local1["tank_" + tank_number].guns[_local1["tank_" + tank_number].cur_gun] == 0) {
_local1["tank_" + tank_number].cur_gun = 0;
}
}
_local1.strela._rotation = rotace - 90;
_local1.strela._x = _x;
_local1.strela._y = _y - 1;
_local1.strela.strela.vo = power;
_local1.strela.strela.owner = _local1[_name];
_local1[_name + "_hlaven"].play();
playing = false;
}
function save_inf() {
var _local1 = _root;
_local1.z_target = target;
_local1.z_target_name = target_.name;
_local1.z_target_energy = target_.energy;
_local1.z_target_live = target_.live;
_local1.z_name = _local1["tank_" + tank_number].name;
_local1.z_energy = _local1["tank_" + tank_number].energy;
if (target._x < _x) {
_local1.z_pos = "right";
} else {
_local1.z_pos = "left";
}
_local1.z_x = _x;
_local1.z_y = _y;
_local1.z_tar_x = target._x;
_local1.z_tar_y = target._y;
_local1.z_last_vitr = last_wind;
_local1.z_vitr = _local1.vitr;
_local1.z_wind_koef_vzd_koef = wind_koef_vzd_koef;
_local1.z_angle = rotace;
_local1.z_power = power;
_local1.z_y_koef = y_koef;
_local1.z_vzd_koef_k = vzd_koef_k;
_local1.z_last_shot_x = last_shot_x;
_local1.z_last_shot_y = last_shot_y;
_local1.z_last_shot_vzd = last_shot_vzd;
_local1.z_last_shot_y_vzd = y_vzd;
_local1.z_last_shot_x_vzd = x_vzd;
_local1.z_dif = dif;
fscommand ("SAVE", ((((((("debug/" add _local1.game) add "_") add rounds) add "_") add _local1.z_pos) add "_") add _local1["tank_" + tank_number].name) add ".txt");
}
dif = _root["tank_" + tank_number].dif;
_y = ((_root["land" + Math.round(_x)]._y - (_root["land" + Math.round(_x)]._height / 2)) - 4);
i = 0;
while (i < _width) {
cur = _root["land" + Math.floor((_x - (_width / 2)) + i)];
if (hitTest(cur)) {
cur._y = cur._y + ((_y + (_height / 2)) - (cur._y - (cur._height / 2)));
}
i++;
}
if (_root["tank_" + tank_number].specials[0] > 0) {
par = true;
}
_root.attachMovie("hlaven", _name + "_hlaven", 10010 + tank_number);
rotace = (random(67) * 2) + 46;
_root[_name + "_hlaven"]._x = _x;
_root[_name + "_hlaven"]._y = _y - 1;
_root[_name + "_hlaven"]._rotation = rotace;
power = 50;
playing = false;
testing = false;
par_active = false;
par_out = false;
par_used = false;
sh_active = false;
_root["t" + tank_number] = _root["tank" + tank_number];
first_shot = true;
first_frame = true;
calc_frame = true;
fuel_c = 1 / (_root["tank_" + tank_number].specials[10] + 1);
rounds = 0;
p_move = false;
select_target();
Symbol 304 MovieClip [ai_hard] Frame 2
if (_y > 400) {
_root["tank_" + tank_number].live = false;
_root["tank_" + tank_number].energy = 0;
_root["tank_" + tank_number].score = _root["tank_" + tank_number].score - 2000;
_root.hracu--;
if (_root["tank_" + tank_number].score < 0) {
_root["tank_" + tank_number].score = 0;
}
gotoAndPlay (4);
}
if (_root["tank_" + tank_number].energy <= 0) {
_root["tank_" + tank_number].energy = 0;
_root["tank_" + tank_number].live = false;
gotoAndPlay (4);
}
_root[_name + "_hlaven"]._x = _x;
_root[_name + "_hlaven"]._y = _y - 1;
if (sh_active) {
_root["shield" + tank_number]._x = _x;
_root["shield" + tank_number]._y = _y;
}
if (playing) {
if ((!target_.live) && (first_frame)) {
rounds = 1;
select_target();
}
if (rounds == 1) {
if (first_frame) {
i = 1;
while (_root.pocet_hracu >= i) {
if ((_root["tank" + i].playing && (i != tank_number)) && (_root["tank_" + i].live)) {
_root["tank" + i].playing = false;
_root.test();
}
i++;
}
first_shot = true;
calc_first_shot();
}
} else if (first_frame) {
calc_shot();
}
first_frame = false;
_root.rotace = rotace;
_root.power = power;
if (prepare_shot()) {
fire();
}
na_zemi = false;
left = true;
right = true;
i = 0;
min = 500;
gg = false;
test_hill();
while (i < _width) {
cur = _root["land" + Math.round((_x - (_width / 2)) + i)];
if (pasy.hitTest(cur)) {
na_zemi = true;
if (par_out) {
par_out = false;
_root["parachute" + tank_number].removeMovieClip();
}
if (fall > 0.4) {
if (fall < 0.8) {
damage(Math.round(fall * 25), this, true);
} else {
damage(Math.round((fall * fall) * 3000), this, true);
}
}
fall = 0;
}
top = cur._y - (cur._height / 2);
if ((top < min) && (na_zemi)) {
gg = true;
min = top;
}
if ((((i + 1) >= _width) && (na_zemi)) && (gg)) {
_y = (min - 2);
gg = false;
}
if (!na_zemi) {
if ((fall >= 0.2) && (par)) {
if (!par_active) {
par_active = true;
_root["tank_" + i].specials[0] = _root["tank_" + i].specials[0] - 1;
}
if (!par_out) {
_root.attachMovie("parachute", "parachute" + tank_number, 9000 + tank_number);
}
par_out = true;
}
_y = (_y + fall);
if (!par_out) {
fall = fall + 0.01;
} else {
_root["parachute" + tank_number]._x = _x;
_root["parachute" + tank_number]._y = _y - 7.5;
fall = 0.2;
_x = (_x + (_root.vitr / 3000));
}
}
i++;
}
if (_root["tank_" + tank_number].energy < power) {
power = _root["tank_" + tank_number].energy;
}
_root[_name + "_hlaven"]._rotation = rotace;
}
if (testing) {
i = 0;
min = 500;
gg = false;
test_hill();
while (i < _width) {
cur = _root["land" + Math.round((_x - (_width / 2)) + i)];
if (pasy.hitTest(cur)) {
if (fall > 0.4) {
if (fall < 0.8) {
damage(Math.round(fall * 25), this, true);
} else {
damage(Math.round((fall * fall) * 80), this, true);
}
}
if (par_out) {
par_out = false;
_root["parachute" + tank_number].removeMovieClip();
}
na_zemi = true;
fall = 0;
}
top = cur._y - (cur._height / 2);
if ((top < min) && (na_zemi)) {
gg = true;
min = top;
}
if ((((i + 1) >= _width) && (na_zemi)) && (gg)) {
_y = (min - 2);
gg = false;
}
if (fall > 0.001) {
test = false;
}
if (!na_zemi) {
if ((fall >= 0.2) && (par)) {
if (!par_active) {
par_active = true;
_root["tank_" + tank_number].specials[0] = _root["tank_" + tank_number].specials[0] - 1;
}
if (!par_out) {
_root.attachMovie("parachute", "parachute" + tank_number, 9000 + tank_number);
}
par_out = true;
}
_y = (_y + fall);
if (!par_out) {
fall = fall + 0.01;
} else {
_root["parachute" + tank_number]._x = _x;
_root["parachute" + tank_number]._y = _y - 7.5;
fall = 0.2;
_x = (_x + (_root.vitr / 3000));
}
}
i++;
}
if (fall > 0.001) {
test = false;
}
test_hill();
x3 = x2;
x2 = x1;
x1 = Math.round(_x);
y3 = y2;
y2 = y1;
y1 = Math.round(_y * 10) / 10;
if ((y1 == y3) && (x1 == x3)) {
test = true;
}
if (test) {
testing = false;
_root[_name + "test"] = false;
}
_root[_name + "_hlaven"]._x = _x;
_root[_name + "_hlaven"]._y = _y - 1;
test = true;
}
Symbol 304 MovieClip [ai_hard] Frame 3
gotoAndPlay (2);
Symbol 304 MovieClip [ai_hard] Frame 4
_root[_name + "_hlaven"].removeMovieClip();
_root["parachute" + tank_number].removeMovieClip();
_root["shield" + tank_number].removeMovieClip();
_root.hracu--;
Symbol 304 MovieClip [ai_hard] Frame 9
i = 0;
while (i < _width) {
cur = _root["land" + Math.round((_x - (_width / 2)) + i)];
x = cur._x;
y = cur._y;
h = cur._y - (cur._height / 2);
if (hitTest(x, h, true)) {
vzr = Math.cos(0.017 * (Math.sqrt(((_x - x) * (_x - x)) + ((_y - h) * (_y - h))) * (180 / _width)));
cur._height = cur._height - (30 * vzr);
cur._y = cur._y + (15 * vzr);
} else if (hitTest(_root["land" + Math.round((xx - (_width / 2)) + i)])) {
cur._height = cur._height - (50 / Math.abs(_x - x));
cur._y = cur._y + ((50 / Math.abs(_x - x)) / 2);
}
i++;
}
i = 1;
while (_root.pocet_hracu >= i) {
current = _root["tank" + i];
if ((hitTest(current) || (hitTest(_root["shield" + i]))) && (i != tank_number)) {
x = _x - current._x;
y = _y - current._y;
vzd = Math.sqrt((x * x) + (y * y));
if (!current.sh_active) {
damg = Math.round(_width / ((vzd + 1) / 14));
if (_root["tank_" + i].energy < damg) {
damg = _root["tank_" + i].energy;
}
} else {
damg = Math.round(_width / (((vzd / 2) + 1) / 18));
}
current.damage(damg, this);
}
i++;
}
Symbol 304 MovieClip [ai_hard] Frame 15
if (playing) {
_root.test();
}
stop();
Symbol 307 MovieClip [ai_normal] Frame 1
function test_hill() {
var _local1 = _root;
calc_hill_up();
if (((_local1["land" + Math.ceil(_x - (_width / 2))]._y - (_local1["land" + Math.ceil(_x - (_width / 2))]._height / 2)) < (_y - hill_up)) || ((_local1["land" + Math.floor(_x - (_width / 2))]._y - (_local1["land" + Math.floor(_x - (_width / 2))]._height / 2)) < (_y - hill_up))) {
_x = (_x + 0.7);
test = false;
left = false;
right = false;
} else if (((_local1["land" + Math.floor(_x + (_width / 2))]._y - (_local1["land" + Math.floor(_x + (_width / 2))]._height / 2)) < (_y - hill_up)) || ((_local1["land" + Math.ceil(_x + (_width / 2))]._y - (_local1["land" + Math.ceil(_x + (_width / 2))]._height / 2)) < (_y - hill_up))) {
left = false;
right = false;
_x = (_x - 0.7);
test = false;
} else {
left = true;
right = true;
}
}
function blik() {
var _local1 = _root;
_local1.attachMovie("blk", "blik", 10030);
_local1.blik._x = _x;
_local1.blik._y = _y - 10;
}
function calc_hill_up() {
hill_up = (0.5 + _root["tank_" + tank_number].specials[11]) - (fall * 10);
}
function move_left() {
var _local1 = _root;
_x = (_x - 0.5);
_local1["tank_" + tank_number].fuel = _local1["tank_" + tank_number].fuel - fuel_c;
moving = true;
i = 1;
while (i < (_local1.pocet_hracu + 1)) {
if (hitTest(_local1["tank" + i]) && (i != tank_number)) {
_x = (_x + 0.6);
}
i++;
}
}
function move_right() {
var _local1 = _root;
_x = (_x + 0.5);
_local1["tank_" + tank_number].fuel = _local1["tank_" + tank_number].fuel - fuel_c;
moving = true;
i = 1;
while (i < (_local1.pocet_hracu + 1)) {
if (hitTest(_local1["tank" + i]) && (i != tank_number)) {
_x = (_x - 0.6);
}
i++;
}
}
function activate_shield(shield) {
var _local1 = _root;
_local1.attachMovie(_local1.specials[2 + shield][4], "shield" + tank_number, 5040 + tank_number);
_local1["shield" + tank_number].num = tank_number;
_local1["tank_" + tank_number].specials[2 + shield]--;
sh_active = true;
_local1["t" + tank_number] = _local1["shield" + tank_number];
}
function disable_shield() {
var _local1 = _root;
_local1["shield" + tank_number].disable();
sh_active = false;
_local1["t" + tank_number] = _local1["tank" + tank_number];
}
function p_m(par) {
if (par > 0) {
return(1);
}
return(-1);
}
function calc_first_shot() {
var _local1 = _root;
_local1.z_ai_dif = "hard";
p_rotace = 90 + (p_m(target._x - _x) * 45);
p_x = _x;
p_power = Math.abs(_x - target._x) / (2 + (Math.abs(_x - target._x) / 110));
if (p_power >= _local1["tank_" + tank_number].energy) {
p_power = _local1["tank_" + tank_number].energy;
}
}
function calc_shot() {
var _local1 = _root;
last_shot_vzd = Math.sqrt(Math.abs((_x - last_shot_x) * (_x - last_shot_x)) + Math.abs((_y - last_shot_y) * (_y - last_shot_y)));
target_vzd = Math.sqrt(Math.abs((_x - target._x) * (_x - target._x)) + Math.abs((_y - target._y) * (_y - target._y)));
x_vzd = Math.abs(last_shot_x - target._x);
y_vzd = Math.abs(last_shot_y - target._y);
if ((power >= _local1["tank_" + tank_number].energy) || (power == 100)) {
full_power = true;
} else {
full_power = false;
}
wind_change_koef = 15;
wind_koef_vzd_koef = 500;
vzd_koef = 18;
vzd_koef_k = 12 + (Math.abs(_x - last_shot_x) / 80);
y_vzd_koef = 50;
y_koef = 40;
rot_r = 106 - ((200 - Math.abs(_x - target._x)) / 30);
rot_l = 74 + ((200 - Math.abs(_x - target._x)) / 30);
if (_x < target._x) {
wind_koef_vzd_koef = wind_koef_vzd_koef - ((180 - rotace) * 3);
y_koef = y_koef + ((135 - rotace) * 1.7);
if (last_shot_x < _x) {
_local1.z_f_used = "1.1";
p_rotace = p_rotace + ((((_x - last_shot_x) / 10) + ((target._x - _x) / 20)) - (_local1.vitr / 50));
} else if ((((last_shot_vzd > 60) || (target_vzd < 70)) || (power < 10)) && ((power < 70) || (last_shot_vzd > 200))) {
_local1.z_f_used = "1.2.1.failed";
if (last_shot_x >= target._x) {
if (x_vzd > 20) {
_local1.z_f_used = "1.2.1.1.1";
p_power = p_power - (((x_vzd / ((vzd_koef + 2.5) - (Math.abs(135 - rotace) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) - ((last_shot_y - target._y) / y_koef));
} else {
_local1.z_f_used = "1.2.1.1.2";
p_power = p_power - ((x_vzd / ((vzd_koef - 1) - (Math.abs(135 - rotace) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
}
} else if (last_shot_y < target._y) {
if (target._y < _y) {
if ((((((((_y - target._y) > 80) && (y_vzd < 80)) && (y_vzd > 20)) && (last_shot_vzd < 100)) && (target_vzd > 220)) && (power > 30)) && ((rot_r - (_local1.vitr / 7)) < rotace)) {
_local1.z_f_used = "1.2.1.2.1.1.1";
p_rotace = p_rotace - ((((rotace - (rot_r - (_local1.vitr / 7))) / 4) + (_local1.vitr / 20)) - (target_vzd / 100));
} else if (rotace < (rot_r - (_local1.vitr / 7))) {
_local1.z_f_used = "1.2.1.2.1.1.2.";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if ((y_vzd < 30) && (x_vzd < 200)) {
_local1.z_f_used = "1.2.1.2.1.1.3";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if (y_vzd >= 30) {
if ((((target._x - _x) > 300) && (power < 50)) && (rotace < 110)) {
_local1.z_f_used = "1.2.1.2.1.1.4.1";
p_power = p_power + ((x_vzd / (vzd_koef / 3)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
} else if ((rot_r - (_local1.vitr / 7)) < rotace) {
if (p_rotace <= 135) {
_local1.z_f_used = "1.2.1.2.1.1.4.2.1";
p_power = p_power + ((((((x_vzd / (vzd_koef * 2)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + (y_vzd / y_vzd_koef)) + ((135 - rotace) / 8)) - (_local1.vitr / 15)) + ((rotace - (rot_r - (_local1.vitr / 7))) / 8));
} else {
_local1.z_f_used = "1.2.1.2.1.1.4.2.2";
p_power = p_power + ((((x_vzd / (vzd_koef * 2)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + (y_vzd / y_vzd_koef)) - (_local1.vitr / 15));
}
p_rotace = p_rotace - (((rotace - (rot_r - (_local1.vitr / 7))) / 4.5) + (y_vzd / y_vzd_koef));
}
}
} else if ((((((((target._y - _y) < 70) && (y_vzd < 100)) && (y_vzd > 20)) && (last_shot_vzd < 100)) && (target_vzd > 250)) && (power > 30)) && ((rot_r - (_local1.vitr / 7)) < rotace)) {
_local1.z_f_used = "1.2.1.2.1.2.1";
p_rotace = p_rotace - ((((rotace - (rot_r - (_local1.vitr / 7))) / 4.5) + (_local1.vitr / 20)) - (target_vzd / 100));
} else if (rotace < (rot_r - (_local1.vitr / 7))) {
_local1.z_f_used = "1.2.1.2.1.2.2";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if ((y_vzd < 30) && (x_vzd < 200)) {
_local1.z_f_used = "1.2.1.2.1.2.3";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if (y_vzd >= 30) {
if (((target._y - _y) > 200) && (_y < last_shot_y)) {
_local1.z_f_used = "1.2.1.2.1.2.4.1";
if (p_rotace > 120) {
_local1.z_f_used = "1.2.1.2.1.2.4.1.1";
p_power = p_power + ((x_vzd / (vzd_koef / 1.5)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
} else {
_local1.z_f_used = "1.2.1.2.1.2.4.1.2";
p_power = p_power + ((x_vzd / (vzd_koef / 2)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
}
} else if ((((target._x - _x) > 300) && (power < 50)) && (rotace < 110)) {
_local1.z_f_used = "1.2.1.2.1.2.4.2.";
p_power = p_power + ((x_vzd / (vzd_koef / 3)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
} else if ((rot_r - (_local1.vitr / 7)) < rotace) {
if (p_rotace <= 135) {
_local1.z_f_used = "1.2.1.2.1.2.4.3.1.";
p_power = p_power + ((((((x_vzd / (vzd_koef * 2)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) - (y_vzd / y_vzd_koef)) + ((135 - rotace) / 8)) - (_local1.vitr / 15)) + ((rotace - (rot_r - (_local1.vitr / 7))) / 8));
} else {
_local1.z_f_used = "1.2.1.2.1.2.4.3.2.";
p_power = p_power + ((((x_vzd / (vzd_koef * 2)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) - (y_vzd / y_vzd_koef)) - (_local1.vitr / 15));
}
p_rotace = p_rotace - (((rotace - (rot_r - (_local1.vitr / 7))) / 4.5) + (y_vzd / y_vzd_koef));
}
}
} else if ((((last_shot_vzd < 150) && ((target._x - _x) < 170)) || (last_shot_vzd >= 100)) || ((last_shot_vzd < 100) && (power < 30))) {
if (target._y < _y) {
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
_local1.z_f_used = "1.2.1.2.2.1.1";
} else if ((target._y - _y) > 100) {
_local1.z_f_used = "1.2.1.2.2.1.2.1";
p_power = p_power + ((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
} else {
_local1.z_f_used = "1.2.1.2.2.1.2.2";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
}
} else if (rotace < ((rot_r - 5) - (root.vitr / 7))) {
_local1.z_f_used = "1.2.1.2.2.2";
p_rotace = p_rotace + ((((135 - rotace) / 10) + target._x) - (_x / 100));
} else {
_local1.z_f_used = "1.2.1.2.2.3";
p_rotace = p_rotace - ((rotace - (rot_r - (_local1.vitr / 7))) / 2);
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) / 1.5) + ((rotace - (rot_r - (_local1.vitr / 7))) / 5));
}
} else if (((_y - target._y) > 100) && ((target._x - _x) < 100)) {
_local1.z_f_used = "1.2.2.1";
p_rotace = p_rotace - ((rotace - (rot_r - (_local1.vitr / 7))) / 2);
} else {
_local1.z_f_used = "1.2.2.2";
p_rotace = p_rotace - (((rotace - (rot_r - (_local1.vitr / 7))) / 2) - ((target._x - _x) / 100));
}
} else {
wind_koef_vzd_koef = wind_koef_vzd_koef - (rotace * 3);
y_koef = y_koef + ((rotace - 45) * 1.7);
if (_x < last_shot_x) {
_local1.z_f_used = "2.1";
p_rotace = p_rotace - ((((last_shot_x - _x) / 10) + ((_x - target._x) / 20)) + (_local1.vitr / 50));
} else if ((((last_shot_vzd > 60) || (target_vzd < 70)) || (power < 10)) && ((power < 70) || (last_shot_vzd > 200))) {
_local1.z_f_used = "2.2.1.failed";
if (target._x >= last_shot_x) {
if (x_vzd > 20) {
_local1.z_f_used = "2.2.1.1.1";
p_power = p_power - (((x_vzd / ((vzd_koef + 2.5) - (Math.abs(45 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) - ((last_shot_y - target._y) / y_koef));
} else {
_local1.z_f_used = "2.2.1.1.2";
p_power = p_power - ((x_vzd / ((vzd_koef - 1) - (Math.abs(45 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
}
} else if (last_shot_y < target._y) {
if (target._y < _y) {
if ((((((((_y - target._y) > 80) && (y_vzd < 80)) && (y_vzd > 20)) && (last_shot_vzd < 100)) && (target_vzd > 220)) && (power > 30)) && ((rot_l + (_local1.vitr / 7)) < rotace)) {
_local1.z_f_used = "2.2.1.2.1.1.1";
p_rotace = p_rotace + (((((rot_l + (_local1.vitr / 7)) - rotace) / 4) - (_local1.vitr / 20)) - (target_vzd / 100));
} else if ((rot_l + (_local1.vitr / 7)) < rotace) {
_local1.z_f_used = "2.2.1.2.1.1.2";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(rotace - 45) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(_x - last_shot_x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if ((y_vzd < 30) && (x_vzd < 200)) {
_local1.z_f_used = "2.2.1.2.1.1.3";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(rotace - 45) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(_x - last_shot_x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if (y_vzd >= 30) {
if ((((_x - target._x) > 300) && (power < 50)) && (rotace > 70)) {
_local1.z_f_used = "2.2.1.2.1.1.4.1";
p_power = p_power + ((x_vzd / (vzd_koef / 3)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(_x - last_shot_x) / wind_koef_vzd_koef))));
} else if (rotace < (rot_l + (_local1.vitr / 7))) {
if (p_rotace >= 45) {
_local1.z_f_used = "2.2.1.2.1.1.4.2.1";
p_power = p_power + ((((((x_vzd / (vzd_koef * 2)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + (y_vzd / y_vzd_koef)) + ((rotace - 45) / 8)) + (_local1.vitr / 15)) + (((rot_l + (_local1.vitr / 7)) - rotace) / 8));
} else {
_local1.z_f_used = "2.2.1.2.1.1.4.2.2";
p_power = p_power + ((((x_vzd / (vzd_koef * 2)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + (y_vzd / y_vzd_koef)) + (_local1.vitr / 15));
}
p_rotace = p_rotace + ((((rot_l + (_local1.vitr / 7)) - rotace) / 4.5) + (y_vzd / y_vzd_koef));
}
}
} else if ((((((((target._y - _y) < 70) && (y_vzd < 100)) && (y_vzd > 20)) && (last_shot_vzd < 100)) && (target_vzd > 250)) && (power > 30)) && (rotace < (rot_l - (_local1.vitr / 7)))) {
_local1.z_f_used = "2.2.1.2.1.2.1";
p_rotace = p_rotace + (((((rot_l + (_local1.vitr / 7)) - rotace) / 4.5) - (_local1.vitr / 20)) - (target_vzd / 100));
} else if ((rot_l + (_local1.vitr / 7)) < rotace) {
_local1.z_f_used = "2.2.1.2.1.2.2";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(rotace - 45) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(_x - last_shot_x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if ((y_vzd < 30) && (x_vzd < 200)) {
_local1.z_f_used = "2.2.1.2.1.2.3";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(45 - rotace) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if (y_vzd >= 30) {
if (((target._y - _y) > 200) && (_y < last_shot_y)) {
if (p_rotace < 60) {
_local1.z_f_used = "2.2.1.2.1.2.4.1.1";
p_power = p_power + ((x_vzd / (vzd_koef / 1.5)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
} else {
_local1.z_f_used = "2.2.1.2.1.2.4.1.2";
p_power = p_power + ((x_vzd / (vzd_koef / 2)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
}
} else if ((((_x - target._x) > 300) && (power < 50)) && (rotace > 70)) {
_local1.z_f_used = "2.2.1.2.1.2.4.2";
p_power = p_power + ((x_vzd / (vzd_koef / 3)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
} else if (rotace < (rot_l + (_local1.vitr / 7))) {
if (p_rotace >= 45) {
_local1.z_f_used = "2.2.1.2.1.2.4.3.1";
p_power = p_power + ((((((x_vzd / (vzd_koef * 2)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + (y_vzd / y_vzd_koef)) + ((rotace - 45) / 8)) + (_local1.vitr / 15)) + (((rot_l + (_local1.vitr / 7)) - rotace) / 8));
} else {
_local1.z_f_used = "2.2.1.2.1.2.4.3.2";
p_power = p_power + ((((x_vzd / (vzd_koef * 2)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + (y_vzd / y_vzd_koef)) + (_local1.vitr / 15));
}
p_rotace = p_rotace + ((((rot_l + (_local1.vitr / 7)) - rotace) / 4.5) + (y_vzd / y_vzd_koef));
}
}
} else if ((((last_shot_vzd < 150) && ((_x - target._x) < 170)) || (last_shot_vzd >= 100)) || ((last_shot_vzd < 100) && (power < 30))) {
if (target._y < _y) {
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(rotace - 45) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
_local1.z_f_used = "2.2.1.2.2.1.1";
} else if ((target._y - _y) > 100) {
_local1.z_f_used = "2.2.1.2.2.1.2.1";
p_power = p_power + ((x_vzd / (vzd_koef - (Math.abs(rotace - 45) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
} else {
_local1.z_f_used = "2.2.1.2.2.1.2.2";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(rotace - 45) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
}
} else if (((rot_l + 5) + (root.vitr / 7)) < rotace) {
_local1.z_f_used = "2.2.1.2.2.2";
p_rotace = p_rotace - ((((rotace - 45) / 10) + _x) - (target._x / 100));
} else {
_local1.z_f_used = "2.2.1.2.2.3";
p_rotace = p_rotace + (((rot_l + (_local1.vitr / 7)) - rotace) / 3);
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(rotace - 45) / vzd_koef_k))) / 1.5) + (((rot_l + (_local1.vitr / 7)) - rotace) / 5));
}
} else if (((_y - target._y) > 100) && ((_x - target._x) < 100)) {
_local1.z_f_used = "2.2.2.1";
p_rotace = p_rotace + (((rot_l + (_local1.vitr / 7)) - rotace) / 2);
} else {
_local1.z_f_used = "2.2.2.2";
p_rotace = p_rotace + ((((rot_l + (_local1.vitr / 7)) - rotace) / 2) - ((target._x - _x) / 100));
}
}
if (p_power > 100) {
p_power = 100;
}
if (p_power >= _local1["tank_" + tank_number].energy) {
p_power = _local1["tank_" + tank_number].energy;
if (_x < target._x) {
if (p_rotace < 135) {
if (p_power > 70) {
p_power = p_power - ((135 - p_rotace) / 2.5);
}
p_rotace = p_rotace + ((135 - p_rotace) / 3);
}
} else if (p_rotace > 45) {
if (p_power > 70) {
p_power = p_power - ((p_rotace - 45) / 2.5);
}
p_rotace = p_rotace - ((p_rotace - 45) / 3);
}
}
if (p_power < 0) {
p_power = 0;
}
if (p_rotace < 0) {
p_rotace = 0;
} else if (p_rotace > 180) {
p_rotace = 180;
}
}
function prepare_shot() {
var _local1 = _root;
prep = true;
if ((Math.max(rotace, p_rotace) - Math.min(rotace, p_rotace)) < 10) {
sp = 1;
} else {
sp = Math.floor((Math.max(rotace, p_rotace) - Math.min(rotace, p_rotace)) / 10);
}
if (Math.ceil(rotace) != Math.ceil(p_rotace)) {
if ((Math.ceil(p_rotace) < Math.ceil(rotace)) && ((rotace - sp) >= 0)) {
prep = false;
rotace = rotace - sp;
_local1.tur.play();
} else if ((rotace + sp) <= 180) {
prep = false;
rotace = rotace + sp;
_local1.tur.play();
}
}
if (Math.ceil(power) != Math.ceil(p_power)) {
if ((Math.ceil(p_power) < Math.ceil(power)) && ((power - sp) >= 0)) {
prep = false;
power = power - sp;
} else if ((power + sp) <= 180) {
prep = false;
power = power + sp;
}
}
if (((Math.round(p_x) != Math.round(_x)) && (_local1["tank_" + tank_number].fuel > 0)) && (p_move)) {
prep = false;
if (Math.round(p_x) < Math.round(_x)) {
move_right();
} else {
move_left();
}
}
if (prep) {
return(true);
}
return(undefined);
}
function select_target() {
var _local1 = _root;
vzd = 1000;
i = 1;
while (_local1.pocet_hracu >= i) {
vz = Math.abs(_x - _local1["tank" + i]._x);
if (((vz < vzd) && (i != tank_number)) && (_local1["tank_" + i].live)) {
vzd = vz;
target = _local1["tank" + i];
target_ = _local1["tank_" + i];
}
i++;
}
}
function na_rade() {
rounds++;
par_active = false;
calc_hill_up();
}
function damage(damag, attacker, par) {
var _local1 = _root;
var _local2 = attacker;
var _local3 = damag;
armor = 1;
arm = 1;
i = 0;
while (i < _local1["tank_" + tank_number].specials[9]) {
armor = armor / (1.12 / arm);
arm = arm / 1.0002;
i++;
}
if ((!sh_active) || (par)) {
_local1["tank_" + tank_number].energy = _local1["tank_" + tank_number].energy - (_local3 * armor);
} else {
_local1["shield" + tank_number].damage(_local3, _local2);
}
if (_local1["tank_" + tank_number].energy <= 0) {
if (this != _local2) {
_local1["tank_" + _local2.tank_number].kills = _local1["tank_" + _local2.tank_number].kills + 1;
_local1["tank_" + _local2.tank_number].score = _local1["tank_" + _local2.tank_number].score + 5000;
_local1["tank_" + _local2.tank_number].total_score = _local1["tank_" + _local2.tank_number].total_score + 5000;
} else {
_local1["tank_" + tank_number].kills = _local1["tank_" + tank_number].kills - 1;
_local1["tank_" + tank_number].score = _local1["tank_" + tank_number].score - 2000;
_local1["tank_" + tank_number].total_score = _local1["tank_" + tank_number].total_score - 2000;
}
}
if (this != _local2) {
_local1["tank_" + _local2.tank_number].score = _local1["tank_" + _local2.tank_number].score + (_local3 * 100);
_local1["tank_" + _local2.tank_number].total_score = _local1["tank_" + _local2.tank_number].total_score + (_local3 * 100);
} else {
if (par) {
_local3 = _local3 / 3;
}
_local1["tank_" + tank_number].score = _local1["tank_" + tank_number].score - Math.round(_local3 * 50);
_local1["tank_" + tank_number].total_score = _local1["tank_" + tank_number].total_score - Math.round(_local3 * 50);
if (_local1["tank_" + tank_number].score < 0) {
_local1["tank_" + tank_number].score = 0;
}
}
}
function fire() {
var _local1 = _root;
if (_local1.debugging) {
save_inf();
}
last_wind = _local1.vitr;
first_frame = true;
_local1.attachMovie(_local1.weapons[_local1["tank_" + tank_number].cur_gun][4], "strela", 1000);
if (_local1["tank_" + tank_number].cur_gun != 0) {
_local1["tank_" + tank_number].guns[_local1["tank_" + tank_number].cur_gun]--;
if (_local1["tank_" + tank_number].guns[_local1["tank_" + tank_number].cur_gun] == 0) {
_local1["tank_" + tank_number].cur_gun = 0;
}
}
_local1.strela._rotation = rotace - 90;
_local1.strela._x = _x;
_local1.strela._y = _y - 1;
_local1.strela.strela.vo = power;
_local1.strela.strela.owner = _local1[_name];
_local1[_name + "_hlaven"].play();
playing = false;
}
function save_inf() {
var _local1 = _root;
_local1.z_target = target;
_local1.z_target_name = target_.name;
_local1.z_target_energy = target_.energy;
_local1.z_target_live = target_.live;
_local1.z_name = _local1["tank_" + tank_number].name;
_local1.z_energy = _local1["tank_" + tank_number].energy;
if (target._x < _x) {
_local1.z_pos = "right";
} else {
_local1.z_pos = "left";
}
_local1.z_x = _x;
_local1.z_y = _y;
_local1.z_tar_x = target._x;
_local1.z_tar_y = target._y;
_local1.z_last_vitr = last_wind;
_local1.z_vitr = _local1.vitr;
_local1.z_wind_koef_vzd_koef = wind_koef_vzd_koef;
_local1.z_angle = rotace;
_local1.z_power = power;
_local1.z_y_koef = y_koef;
_local1.z_vzd_koef_k = vzd_koef_k;
_local1.z_last_shot_x = last_shot_x;
_local1.z_last_shot_y = last_shot_y;
_local1.z_last_shot_vzd = last_shot_vzd;
_local1.z_last_shot_y_vzd = y_vzd;
_local1.z_last_shot_x_vzd = x_vzd;
_local1.z_dif = dif;
fscommand ("SAVE", ((((((("debug/" add _local1.game) add "_") add rounds) add "_") add _local1.z_pos) add "_") add _local1["tank_" + tank_number].name) add ".txt");
}
dif = _root["tank_" + tank_number].dif;
_y = ((_root["land" + Math.round(_x)]._y - (_root["land" + Math.round(_x)]._height / 2)) - 4);
i = 0;
while (i < _width) {
cur = _root["land" + Math.floor((_x - (_width / 2)) + i)];
if (hitTest(cur)) {
cur._y = cur._y + ((_y + (_height / 2)) - (cur._y - (cur._height / 2)));
}
i++;
}
if (_root["tank_" + tank_number].specials[0] > 0) {
par = true;
}
_root.attachMovie("hlaven", _name + "_hlaven", 10010 + tank_number);
rotace = (random(67) * 2) + 46;
_root[_name + "_hlaven"]._x = _x;
_root[_name + "_hlaven"]._y = _y - 1;
_root[_name + "_hlaven"]._rotation = rotace;
power = 50;
playing = false;
testing = false;
par_active = false;
par_out = false;
par_used = false;
sh_active = false;
_root["t" + tank_number] = _root["tank" + tank_number];
first_shot = true;
first_frame = true;
calc_frame = true;
fuel_c = 1 / (_root["tank_" + tank_number].specials[10] + 1);
rounds = 0;
p_move = false;
select_target();
Symbol 307 MovieClip [ai_normal] Frame 2
if (_y > 400) {
_root["tank_" + tank_number].live = false;
_root["tank_" + tank_number].energy = 0;
_root["tank_" + tank_number].score = _root["tank_" + tank_number].score - 2000;
_root.hracu--;
if (_root["tank_" + tank_number].score < 0) {
_root["tank_" + tank_number].score = 0;
}
gotoAndPlay (4);
}
if (_root["tank_" + tank_number].energy <= 0) {
_root["tank_" + tank_number].energy = 0;
_root["tank_" + tank_number].live = false;
gotoAndPlay (4);
}
_root[_name + "_hlaven"]._x = _x;
_root[_name + "_hlaven"]._y = _y - 1;
if (sh_active) {
_root["shield" + tank_number]._x = _x;
_root["shield" + tank_number]._y = _y;
}
if (playing) {
if ((!target_.live) && (first_frame)) {
rounds = 1;
select_target();
}
if (rounds == 1) {
if (first_frame) {
i = 1;
while (_root.pocet_hracu >= i) {
if ((_root["tank" + i].playing && (i != tank_number)) && (_root["tank_" + i].live)) {
_root["tank" + i].playing = false;
_root.test();
}
i++;
}
first_shot = true;
calc_first_shot();
}
} else if (first_frame) {
calc_shot();
}
first_frame = false;
_root.rotace = rotace;
_root.power = power;
if (prepare_shot()) {
fire();
}
na_zemi = false;
left = true;
right = true;
i = 0;
min = 500;
gg = false;
test_hill();
while (i < _width) {
cur = _root["land" + Math.round((_x - (_width / 2)) + i)];
if (pasy.hitTest(cur)) {
na_zemi = true;
if (par_out) {
par_out = false;
_root["parachute" + tank_number].removeMovieClip();
}
if (fall > 0.4) {
if (fall < 0.8) {
damage(Math.round(fall * 25), this, true);
} else {
damage(Math.round((fall * fall) * 3000), this, true);
}
}
fall = 0;
}
top = cur._y - (cur._height / 2);
if ((top < min) && (na_zemi)) {
gg = true;
min = top;
}
if ((((i + 1) >= _width) && (na_zemi)) && (gg)) {
_y = (min - 2);
gg = false;
}
if (!na_zemi) {
if ((fall >= 0.2) && (par)) {
if (!par_active) {
par_active = true;
_root["tank_" + i].specials[0] = _root["tank_" + i].specials[0] - 1;
}
if (!par_out) {
_root.attachMovie("parachute", "parachute" + tank_number, 9000 + tank_number);
}
par_out = true;
}
_y = (_y + fall);
if (!par_out) {
fall = fall + 0.01;
} else {
_root["parachute" + tank_number]._x = _x;
_root["parachute" + tank_number]._y = _y - 7.5;
fall = 0.2;
_x = (_x + (_root.vitr / 3000));
}
}
i++;
}
if (_root["tank_" + tank_number].energy < power) {
power = _root["tank_" + tank_number].energy;
}
_root[_name + "_hlaven"]._rotation = rotace;
}
if (testing) {
i = 0;
min = 500;
gg = false;
test_hill();
while (i < _width) {
cur = _root["land" + Math.round((_x - (_width / 2)) + i)];
if (pasy.hitTest(cur)) {
if (fall > 0.4) {
if (fall < 0.8) {
damage(Math.round(fall * 25), this, true);
} else {
damage(Math.round((fall * fall) * 80), this, true);
}
}
if (par_out) {
par_out = false;
_root["parachute" + tank_number].removeMovieClip();
}
na_zemi = true;
fall = 0;
}
top = cur._y - (cur._height / 2);
if ((top < min) && (na_zemi)) {
gg = true;
min = top;
}
if ((((i + 1) >= _width) && (na_zemi)) && (gg)) {
_y = (min - 2);
gg = false;
}
if (fall > 0.001) {
test = false;
}
if (!na_zemi) {
if ((fall >= 0.2) && (par)) {
if (!par_active) {
par_active = true;
_root["tank_" + tank_number].specials[0] = _root["tank_" + tank_number].specials[0] - 1;
}
if (!par_out) {
_root.attachMovie("parachute", "parachute" + tank_number, 9000 + tank_number);
}
par_out = true;
}
_y = (_y + fall);
if (!par_out) {
fall = fall + 0.01;
} else {
_root["parachute" + tank_number]._x = _x;
_root["parachute" + tank_number]._y = _y - 7.5;
fall = 0.2;
_x = (_x + (_root.vitr / 3000));
}
}
i++;
}
if (fall > 0.001) {
test = false;
}
test_hill();
x3 = x2;
x2 = x1;
x1 = Math.round(_x);
y3 = y2;
y2 = y1;
y1 = Math.round(_y * 10) / 10;
if ((y1 == y3) && (x1 == x3)) {
test = true;
}
if (test) {
testing = false;
_root[_name + "test"] = false;
}
_root[_name + "_hlaven"]._x = _x;
_root[_name + "_hlaven"]._y = _y - 1;
test = true;
}
Symbol 307 MovieClip [ai_normal] Frame 3
gotoAndPlay (2);
Symbol 307 MovieClip [ai_normal] Frame 4
_root[_name + "_hlaven"].removeMovieClip();
_root["parachute" + tank_number].removeMovieClip();
_root["shield" + tank_number].removeMovieClip();
_root.hracu--;
Symbol 307 MovieClip [ai_normal] Frame 9
i = 0;
while (i < _width) {
cur = _root["land" + Math.round((_x - (_width / 2)) + i)];
x = cur._x;
y = cur._y;
h = cur._y - (cur._height / 2);
if (hitTest(x, h, true)) {
vzr = Math.cos(0.017 * (Math.sqrt(((_x - x) * (_x - x)) + ((_y - h) * (_y - h))) * (180 / _width)));
cur._height = cur._height - (30 * vzr);
cur._y = cur._y + (15 * vzr);
} else if (hitTest(_root["land" + Math.round((xx - (_width / 2)) + i)])) {
cur._height = cur._height - (50 / Math.abs(_x - x));
cur._y = cur._y + ((50 / Math.abs(_x - x)) / 2);
}
i++;
}
i = 1;
while (_root.pocet_hracu >= i) {
current = _root["tank" + i];
if ((hitTest(current) || (hitTest(_root["shield" + i]))) && (i != tank_number)) {
x = _x - current._x;
y = _y - current._y;
vzd = Math.sqrt((x * x) + (y * y));
if (!current.sh_active) {
damg = Math.round(_width / ((vzd + 1) / 14));
if (_root["tank_" + i].energy < damg) {
damg = _root["tank_" + i].energy;
}
} else {
damg = Math.round(_width / (((vzd / 2) + 1) / 18));
}
current.damage(damg, this);
}
i++;
}
Symbol 307 MovieClip [ai_normal] Frame 15
if (playing) {
_root.test();
}
stop();
Symbol 310 MovieClip [ai_easy] Frame 1
function test_hill() {
var _local1 = _root;
calc_hill_up();
if (((_local1["land" + Math.ceil(_x - (_width / 2))]._y - (_local1["land" + Math.ceil(_x - (_width / 2))]._height / 2)) < (_y - hill_up)) || ((_local1["land" + Math.floor(_x - (_width / 2))]._y - (_local1["land" + Math.floor(_x - (_width / 2))]._height / 2)) < (_y - hill_up))) {
_x = (_x + 0.7);
test = false;
left = false;
right = false;
} else if (((_local1["land" + Math.floor(_x + (_width / 2))]._y - (_local1["land" + Math.floor(_x + (_width / 2))]._height / 2)) < (_y - hill_up)) || ((_local1["land" + Math.ceil(_x + (_width / 2))]._y - (_local1["land" + Math.ceil(_x + (_width / 2))]._height / 2)) < (_y - hill_up))) {
left = false;
right = false;
_x = (_x - 0.7);
test = false;
} else {
left = true;
right = true;
}
}
function blik() {
var _local1 = _root;
_local1.attachMovie("blk", "blik", 10030);
_local1.blik._x = _x;
_local1.blik._y = _y - 10;
}
function calc_hill_up() {
hill_up = (0.5 + _root["tank_" + tank_number].specials[11]) - (fall * 10);
}
function move_left() {
var _local1 = _root;
_x = (_x - 0.5);
_local1["tank_" + tank_number].fuel = _local1["tank_" + tank_number].fuel - fuel_c;
moving = true;
i = 1;
while (i < (_local1.pocet_hracu + 1)) {
if (hitTest(_local1["tank" + i]) && (i != tank_number)) {
_x = (_x + 0.6);
}
i++;
}
}
function move_right() {
var _local1 = _root;
_x = (_x + 0.5);
_local1["tank_" + tank_number].fuel = _local1["tank_" + tank_number].fuel - fuel_c;
moving = true;
i = 1;
while (i < (_local1.pocet_hracu + 1)) {
if (hitTest(_local1["tank" + i]) && (i != tank_number)) {
_x = (_x - 0.6);
}
i++;
}
}
function activate_shield(shield) {
var _local1 = _root;
_local1.attachMovie(_local1.specials[2 + shield][4], "shield" + tank_number, 5040 + tank_number);
_local1["shield" + tank_number].num = tank_number;
_local1["tank_" + tank_number].specials[2 + shield]--;
sh_active = true;
_local1["t" + tank_number] = _local1["shield" + tank_number];
}
function disable_shield() {
var _local1 = _root;
_local1["shield" + tank_number].disable();
sh_active = false;
_local1["t" + tank_number] = _local1["tank" + tank_number];
}
function p_m(par) {
if (par > 0) {
return(1);
}
return(-1);
}
function calc_first_shot() {
var _local1 = _root;
_local1.z_ai_dif = "hard";
p_rotace = 90 + (p_m(target._x - _x) * 45);
p_x = _x;
p_power = Math.abs(_x - target._x) / (2 + (Math.abs(_x - target._x) / 120));
if (p_power >= _local1["tank_" + tank_number].energy) {
p_power = _local1["tank_" + tank_number].energy;
}
}
function calc_shot() {
var _local1 = _root;
last_shot_vzd = Math.sqrt(Math.abs((_x - last_shot_x) * (_x - last_shot_x)) + Math.abs((_y - last_shot_y) * (_y - last_shot_y)));
target_vzd = Math.sqrt(Math.abs((_x - target._x) * (_x - target._x)) + Math.abs((_y - target._y) * (_y - target._y)));
x_vzd = Math.abs(last_shot_x - target._x);
y_vzd = Math.abs(last_shot_y - target._y);
if ((power >= _local1["tank_" + tank_number].energy) || (power == 100)) {
full_power = true;
} else {
full_power = false;
}
wind_change_koef = 99999 /* 0x01869F */;
wind_koef_vzd_koef = 380000 /* 0x05CC60 */;
vzd_koef = 25;
vzd_koef_k = 15 + (Math.abs(_x - last_shot_x) / 80);
y_vzd_koef = 3000;
y_koef = 22000;
rot_r = 100 - ((200 - Math.abs(_x - target._x)) / 30);
rot_l = 80 + ((200 - Math.abs(_x - target._x)) / 30);
if (_x < target._x) {
wind_koef_vzd_koef = wind_koef_vzd_koef - ((180 - rotace) * 3);
y_koef = y_koef + ((135 - rotace) * 1.7);
if (last_shot_x < _x) {
_local1.z_f_used = "1.1";
p_rotace = p_rotace + ((((_x - last_shot_x) / 10) + ((target._x - _x) / 20)) - (_local1.vitr / 50));
} else if (((last_shot_vzd > 60) || (target_vzd < 70)) || (power < 10)) {
_local1.z_f_used = "1.2.1.failed";
if (last_shot_x >= target._x) {
if (x_vzd > 20) {
_local1.z_f_used = "1.2.1.1.1";
p_power = p_power - (((x_vzd / ((vzd_koef + 2.5) - (Math.abs(135 - rotace) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) - ((last_shot_y - target._y) / y_koef));
} else {
_local1.z_f_used = "1.2.1.1.2";
p_power = p_power - ((x_vzd / ((vzd_koef - 1) - (Math.abs(135 - rotace) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
}
} else if (last_shot_y < target._y) {
if (target._y < _y) {
if ((((((((_y - target._y) > 80) && (y_vzd < 80)) && (y_vzd > 20)) && (last_shot_vzd < 100)) && (target_vzd > 220)) && (power > 30)) && ((rot_r - (_local1.vitr / 7)) < rotace)) {
_local1.z_f_used = "1.2.1.2.1.1.1";
p_rotace = p_rotace - ((((rotace - (rot_r - (_local1.vitr / 7))) / 4) + (_local1.vitr / 20)) - (target_vzd / 100));
} else if (rotace < (rot_r - (_local1.vitr / 7))) {
_local1.z_f_used = "1.2.1.2.1.1.2.";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if ((y_vzd < 30) && (x_vzd < 200)) {
_local1.z_f_used = "1.2.1.2.1.1.3";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if (y_vzd >= 30) {
if ((((target._x - _x) > 300) && (power < 50)) && (rotace < 110)) {
_local1.z_f_used = "1.2.1.2.1.1.4.1";
p_power = p_power + ((x_vzd / (vzd_koef / 3)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
} else if ((rot_r - (_local1.vitr / 7)) < rotace) {
if (p_rotace <= 135) {
_local1.z_f_used = "1.2.1.2.1.1.4.2.1";
p_power = p_power + ((((((x_vzd / (vzd_koef * 2)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + (y_vzd / y_vzd_koef)) + ((135 - rotace) / 8)) - (_local1.vitr / 15)) + ((rotace - (rot_r - (_local1.vitr / 7))) / 8));
} else {
_local1.z_f_used = "1.2.1.2.1.1.4.2.2";
p_power = p_power + ((((x_vzd / (vzd_koef * 2)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + (y_vzd / y_vzd_koef)) - (_local1.vitr / 15));
}
p_rotace = p_rotace - (((rotace - (rot_r - (_local1.vitr / 7))) / 4.5) + (y_vzd / y_vzd_koef));
}
}
} else if ((((((((target._y - _y) < 70) && (y_vzd < 100)) && (y_vzd > 20)) && (last_shot_vzd < 100)) && (target_vzd > 250)) && (power > 30)) && ((rot_r - (_local1.vitr / 7)) < rotace)) {
_local1.z_f_used = "1.2.1.2.1.2.1";
p_rotace = p_rotace - ((((rotace - (rot_r - (_local1.vitr / 7))) / 4.5) + (_local1.vitr / 20)) - (target_vzd / 100));
} else if (rotace < (rot_r - (_local1.vitr / 7))) {
_local1.z_f_used = "1.2.1.2.1.2.2";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if ((y_vzd < 30) && (x_vzd < 200)) {
_local1.z_f_used = "1.2.1.2.1.2.3";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if (y_vzd >= 30) {
if (((target._y - _y) > 200) && (_y < last_shot_y)) {
_local1.z_f_used = "1.2.1.2.1.2.4.1";
if (p_rotace > 120) {
_local1.z_f_used = "1.2.1.2.1.2.4.1.1";
p_power = p_power + ((x_vzd / (vzd_koef / 1.5)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
} else {
_local1.z_f_used = "1.2.1.2.1.2.4.1.2";
p_power = p_power + ((x_vzd / (vzd_koef / 2)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
}
} else if ((((target._x - _x) > 300) && (power < 50)) && (rotace < 110)) {
_local1.z_f_used = "1.2.1.2.1.2.4.2.";
p_power = p_power + ((x_vzd / (vzd_koef / 3)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
} else if ((rot_r - (_local1.vitr / 7)) < rotace) {
if (p_rotace <= 135) {
_local1.z_f_used = "1.2.1.2.1.2.4.3.1.";
p_power = p_power + ((((((x_vzd / (vzd_koef * 2)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) - (y_vzd / y_vzd_koef)) + ((135 - rotace) / 8)) - (_local1.vitr / 15)) + ((rotace - (rot_r - (_local1.vitr / 7))) / 8));
} else {
_local1.z_f_used = "1.2.1.2.1.2.4.3.2.";
p_power = p_power + ((((x_vzd / (vzd_koef * 2)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) - (y_vzd / y_vzd_koef)) - (_local1.vitr / 15));
}
p_rotace = p_rotace - (((rotace - (rot_r - (_local1.vitr / 7))) / 4.5) + (y_vzd / y_vzd_koef));
}
}
} else if ((((last_shot_vzd < 150) && ((target._x - _x) < 170)) || (last_shot_vzd >= 100)) || ((last_shot_vzd < 100) && (power < 30))) {
if (target._y < _y) {
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
_local1.z_f_used = "1.2.1.2.2.1.1";
} else if ((target._y - _y) > 100) {
_local1.z_f_used = "1.2.1.2.2.1.2.1";
p_power = p_power + ((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
} else {
_local1.z_f_used = "1.2.1.2.2.1.2.2";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
}
} else if (rotace < ((rot_r - 5) - (root.vitr / 7))) {
_local1.z_f_used = "1.2.1.2.2.2";
p_rotace = p_rotace + ((((135 - rotace) / 10) + target._x) - (_x / 100));
} else {
_local1.z_f_used = "1.2.1.2.2.3";
p_rotace = p_rotace - ((rotace - (rot_r - (_local1.vitr / 7))) / 2);
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) / 1.5) + ((rotace - (rot_r - (_local1.vitr / 7))) / 5));
}
} else if (((_y - target._y) > 100) && ((target._x - _x) < 100)) {
_local1.z_f_used = "1.2.2.1";
p_rotace = p_rotace - ((rotace - (rot_r - (_local1.vitr / 7))) / 2);
} else {
_local1.z_f_used = "1.2.2.2";
p_rotace = p_rotace - (((rotace - (rot_r - (_local1.vitr / 7))) / 2) - ((target._x - _x) / 100));
}
} else {
wind_koef_vzd_koef = wind_koef_vzd_koef - (rotace * 3);
y_koef = y_koef + ((rotace - 45) * 1.7);
if (_x < last_shot_x) {
_local1.z_f_used = "2.1";
p_rotace = p_rotace - ((((last_shot_x - _x) / 10) + ((_x - target._x) / 20)) + (_local1.vitr / 50));
} else if (((last_shot_vzd > 60) || (target_vzd < 70)) || (power < 10)) {
_local1.z_f_used = "2.2.1.failed";
if (target._x >= last_shot_x) {
if (x_vzd > 20) {
_local1.z_f_used = "2.2.1.1.1";
p_power = p_power - (((x_vzd / ((vzd_koef + 2.5) - (Math.abs(45 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) - ((last_shot_y - target._y) / y_koef));
} else {
_local1.z_f_used = "2.2.1.1.2";
p_power = p_power - ((x_vzd / ((vzd_koef - 1) - (Math.abs(45 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
}
} else if (last_shot_y < target._y) {
if (target._y < _y) {
if ((((((((_y - target._y) > 80) && (y_vzd < 80)) && (y_vzd > 20)) && (last_shot_vzd < 100)) && (target_vzd > 220)) && (power > 30)) && ((rot_l + (_local1.vitr / 7)) < rotace)) {
_local1.z_f_used = "2.2.1.2.1.1.1";
p_rotace = p_rotace + (((((rot_l + (_local1.vitr / 7)) - rotace) / 4) - (_local1.vitr / 20)) - (target_vzd / 100));
} else if ((rot_l + (_local1.vitr / 7)) < rotace) {
_local1.z_f_used = "2.2.1.2.1.1.2";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(rotace - 45) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(_x - last_shot_x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if ((y_vzd < 30) && (x_vzd < 200)) {
_local1.z_f_used = "2.2.1.2.1.1.3";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(rotace - 45) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(_x - last_shot_x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if (y_vzd >= 30) {
if ((((_x - target._x) > 300) && (power < 50)) && (rotace > 70)) {
_local1.z_f_used = "2.2.1.2.1.1.4.1";
p_power = p_power + ((x_vzd / (vzd_koef / 3)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(_x - last_shot_x) / wind_koef_vzd_koef))));
} else if (rotace < (rot_l + (_local1.vitr / 7))) {
if (p_rotace >= 45) {
_local1.z_f_used = "2.2.1.2.1.1.4.2.1";
p_power = p_power + ((((((x_vzd / (vzd_koef * 2)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + (y_vzd / y_vzd_koef)) + ((rotace - 45) / 8)) + (_local1.vitr / 15)) + (((rot_l + (_local1.vitr / 7)) - rotace) / 8));
} else {
_local1.z_f_used = "2.2.1.2.1.1.4.2.2";
p_power = p_power + ((((x_vzd / (vzd_koef * 2)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + (y_vzd / y_vzd_koef)) + (_local1.vitr / 15));
}
p_rotace = p_rotace + ((((rot_l + (_local1.vitr / 7)) - rotace) / 4.5) + (y_vzd / y_vzd_koef));
}
}
} else if ((((((((target._y - _y) < 70) && (y_vzd < 100)) && (y_vzd > 20)) && (last_shot_vzd < 100)) && (target_vzd > 250)) && (power > 30)) && (rotace < (rot_l - (_local1.vitr / 7)))) {
_local1.z_f_used = "2.2.1.2.1.2.1";
p_rotace = p_rotace + (((((rot_l + (_local1.vitr / 7)) - rotace) / 4.5) - (_local1.vitr / 20)) - (target_vzd / 100));
} else if ((rot_l + (_local1.vitr / 7)) < rotace) {
_local1.z_f_used = "2.2.1.2.1.2.2";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(rotace - 45) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(_x - last_shot_x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if ((y_vzd < 30) && (x_vzd < 200)) {
_local1.z_f_used = "2.2.1.2.1.2.3";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(45 - rotace) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if (y_vzd >= 30) {
if (((target._y - _y) > 200) && (_y < last_shot_y)) {
if (p_rotace < 60) {
_local1.z_f_used = "2.2.1.2.1.2.4.1.1";
p_power = p_power + ((x_vzd / (vzd_koef / 1.5)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
} else {
_local1.z_f_used = "2.2.1.2.1.2.4.1.2";
p_power = p_power + ((x_vzd / (vzd_koef / 2)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
}
} else if ((((_x - target._x) > 300) && (power < 50)) && (rotace > 70)) {
_local1.z_f_used = "2.2.1.2.1.2.4.2";
p_power = p_power + ((x_vzd / (vzd_koef / 3)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
} else if (rotace < (rot_l + (_local1.vitr / 7))) {
if (p_rotace >= 45) {
_local1.z_f_used = "2.2.1.2.1.2.4.3.1";
p_power = p_power + ((((((x_vzd / (vzd_koef * 2)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + (y_vzd / y_vzd_koef)) + ((rotace - 45) / 8)) + (_local1.vitr / 15)) + (((rot_l + (_local1.vitr / 7)) - rotace) / 8));
} else {
_local1.z_f_used = "2.2.1.2.1.2.4.3.2";
p_power = p_power + ((((x_vzd / (vzd_koef * 2)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + (y_vzd / y_vzd_koef)) + (_local1.vitr / 15));
}
p_rotace = p_rotace + ((((rot_l + (_local1.vitr / 7)) - rotace) / 4.5) + (y_vzd / y_vzd_koef));
}
}
} else if ((((last_shot_vzd < 150) && ((_x - target._x) < 170)) || (last_shot_vzd >= 100)) || ((last_shot_vzd < 100) && (power < 30))) {
if (target._y < _y) {
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(rotace - 45) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
_local1.z_f_used = "2.2.1.2.2.1.1";
} else if ((target._y - _y) > 100) {
_local1.z_f_used = "2.2.1.2.2.1.2.1";
p_power = p_power + ((x_vzd / (vzd_koef - (Math.abs(rotace - 45) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
} else {
_local1.z_f_used = "2.2.1.2.2.1.2.2";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(rotace - 45) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
}
} else if (((rot_l + 5) + (root.vitr / 7)) < rotace) {
_local1.z_f_used = "2.2.1.2.2.2";
p_rotace = p_rotace - ((((rotace - 45) / 10) + _x) - (target._x / 100));
} else {
_local1.z_f_used = "2.2.1.2.2.3";
p_rotace = p_rotace + (((rot_l + (_local1.vitr / 7)) - rotace) / 3);
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(rotace - 45) / vzd_koef_k))) / 1.5) + (((rot_l + (_local1.vitr / 7)) - rotace) / 5));
}
} else if (((_y - target._y) > 100) && ((_x - target._x) < 100)) {
_local1.z_f_used = "2.2.2.1";
p_rotace = p_rotace + (((rot_l + (_local1.vitr / 7)) - rotace) / 2);
} else {
_local1.z_f_used = "2.2.2.2";
p_rotace = p_rotace + ((((rot_l + (_local1.vitr / 7)) - rotace) / 2) - ((target._x - _x) / 100));
}
}
if (p_power > 100) {
p_power = 100;
}
if (p_power >= _local1["tank_" + tank_number].energy) {
p_power = _local1["tank_" + tank_number].energy;
if (_x < target._x) {
if (p_rotace < 135) {
if (p_power > 70) {
p_power = p_power - ((135 - p_rotace) / 2.5);
}
p_rotace = p_rotace + ((135 - p_rotace) / 3);
}
} else if (p_rotace > 45) {
if (p_power > 70) {
p_power = p_power - ((p_rotace - 45) / 2.5);
}
p_rotace = p_rotace - ((p_rotace - 45) / 3);
}
}
if (p_power < 0) {
p_power = 0;
}
if (p_rotace < 0) {
p_rotace = 0;
} else if (p_rotace > 180) {
p_rotace = 180;
}
}
function prepare_shot() {
var _local1 = _root;
prep = true;
if ((Math.max(rotace, p_rotace) - Math.min(rotace, p_rotace)) < 10) {
sp = 1;
} else {
sp = Math.floor((Math.max(rotace, p_rotace) - Math.min(rotace, p_rotace)) / 10);
}
if (Math.ceil(rotace) != Math.ceil(p_rotace)) {
if ((Math.ceil(p_rotace) < Math.ceil(rotace)) && ((rotace - sp) >= 0)) {
prep = false;
rotace = rotace - sp;
_local1.tur.play();
} else if ((rotace + sp) <= 180) {
prep = false;
rotace = rotace + sp;
_local1.tur.play();
}
}
if (Math.ceil(power) != Math.ceil(p_power)) {
if ((Math.ceil(p_power) < Math.ceil(power)) && ((power - sp) >= 0)) {
prep = false;
power = power - sp;
} else if ((power + sp) <= 180) {
prep = false;
power = power + sp;
}
}
if (((Math.round(p_x) != Math.round(_x)) && (_local1["tank_" + tank_number].fuel > 0)) && (p_move)) {
prep = false;
if (Math.round(p_x) < Math.round(_x)) {
move_right();
} else {
move_left();
}
}
if (prep) {
return(true);
}
return(undefined);
}
function select_target() {
var _local1 = _root;
vzd = 1000;
i = 1;
while (_local1.pocet_hracu >= i) {
vz = Math.abs(_x - _local1["tank" + i]._x);
if (((vz < vzd) && (i != tank_number)) && (_local1["tank_" + i].live)) {
vzd = vz;
target = _local1["tank" + i];
target_ = _local1["tank_" + i];
}
i++;
}
}
function na_rade() {
rounds++;
par_active = false;
calc_hill_up();
}
function damage(damag, attacker, par) {
var _local1 = _root;
var _local2 = attacker;
var _local3 = damag;
armor = 1;
arm = 1;
i = 0;
while (i < _local1["tank_" + tank_number].specials[9]) {
armor = armor / (1.12 / arm);
arm = arm / 1.0002;
i++;
}
if ((!sh_active) || (par)) {
_local1["tank_" + tank_number].energy = _local1["tank_" + tank_number].energy - (_local3 * armor);
} else {
_local1["shield" + tank_number].damage(_local3, _local2);
}
if (_local1["tank_" + tank_number].energy <= 0) {
if (this != _local2) {
_local1["tank_" + _local2.tank_number].kills = _local1["tank_" + _local2.tank_number].kills + 1;
_local1["tank_" + _local2.tank_number].score = _local1["tank_" + _local2.tank_number].score + 5000;
_local1["tank_" + _local2.tank_number].total_score = _local1["tank_" + _local2.tank_number].total_score + 5000;
} else {
_local1["tank_" + tank_number].kills = _local1["tank_" + tank_number].kills - 1;
_local1["tank_" + tank_number].score = _local1["tank_" + tank_number].score - 2000;
_local1["tank_" + tank_number].total_score = _local1["tank_" + tank_number].total_score - 2000;
}
}
if (this != _local2) {
_local1["tank_" + _local2.tank_number].score = _local1["tank_" + _local2.tank_number].score + (_local3 * 100);
_local1["tank_" + _local2.tank_number].total_score = _local1["tank_" + _local2.tank_number].total_score + (_local3 * 100);
} else {
if (par) {
_local3 = _local3 / 3;
}
_local1["tank_" + tank_number].score = _local1["tank_" + tank_number].score - Math.round(_local3 * 50);
_local1["tank_" + tank_number].total_score = _local1["tank_" + tank_number].total_score - Math.round(_local3 * 50);
if (_local1["tank_" + tank_number].score < 0) {
_local1["tank_" + tank_number].score = 0;
}
}
}
function fire() {
var _local1 = _root;
if (_local1.debugging) {
save_inf();
}
last_wind = _local1.vitr;
first_frame = true;
_local1.attachMovie(_local1.weapons[_local1["tank_" + tank_number].cur_gun][4], "strela", 1000);
if (_local1["tank_" + tank_number].cur_gun != 0) {
_local1["tank_" + tank_number].guns[_local1["tank_" + tank_number].cur_gun]--;
if (_local1["tank_" + tank_number].guns[_local1["tank_" + tank_number].cur_gun] == 0) {
_local1["tank_" + tank_number].cur_gun = 0;
}
}
_local1.strela._rotation = rotace - 90;
_local1.strela._x = _x;
_local1.strela._y = _y - 1;
_local1.strela.strela.vo = power;
_local1.strela.strela.owner = _local1[_name];
_local1[_name + "_hlaven"].play();
playing = false;
}
function save_inf() {
var _local1 = _root;
_local1.z_target = target;
_local1.z_target_name = target_.name;
_local1.z_target_energy = target_.energy;
_local1.z_target_live = target_.live;
_local1.z_name = _local1["tank_" + tank_number].name;
_local1.z_energy = _local1["tank_" + tank_number].energy;
if (target._x < _x) {
_local1.z_pos = "right";
} else {
_local1.z_pos = "left";
}
_local1.z_x = _x;
_local1.z_y = _y;
_local1.z_tar_x = target._x;
_local1.z_tar_y = target._y;
_local1.z_last_vitr = last_wind;
_local1.z_vitr = _local1.vitr;
_local1.z_wind_koef_vzd_koef = wind_koef_vzd_koef;
_local1.z_angle = rotace;
_local1.z_power = power;
_local1.z_y_koef = y_koef;
_local1.z_vzd_koef_k = vzd_koef_k;
_local1.z_last_shot_x = last_shot_x;
_local1.z_last_shot_y = last_shot_y;
_local1.z_last_shot_vzd = last_shot_vzd;
_local1.z_last_shot_y_vzd = y_vzd;
_local1.z_last_shot_x_vzd = x_vzd;
_local1.z_dif = dif;
fscommand ("SAVE", ((((((("debug/" add _local1.game) add "_") add rounds) add "_") add _local1.z_pos) add "_") add _local1["tank_" + tank_number].name) add ".txt");
}
dif = _root["tank_" + tank_number].dif;
_y = ((_root["land" + Math.round(_x)]._y - (_root["land" + Math.round(_x)]._height / 2)) - 4);
i = 0;
while (i < _width) {
cur = _root["land" + Math.floor((_x - (_width / 2)) + i)];
if (hitTest(cur)) {
cur._y = cur._y + ((_y + (_height / 2)) - (cur._y - (cur._height / 2)));
}
i++;
}
if (_root["tank_" + tank_number].specials[0] > 0) {
par = true;
}
_root.attachMovie("hlaven", _name + "_hlaven", 10010 + tank_number);
rotace = (random(67) * 2) + 46;
_root[_name + "_hlaven"]._x = _x;
_root[_name + "_hlaven"]._y = _y - 1;
_root[_name + "_hlaven"]._rotation = rotace;
power = 50;
playing = false;
testing = false;
par_active = false;
par_out = false;
par_used = false;
sh_active = false;
_root["t" + tank_number] = _root["tank" + tank_number];
first_shot = true;
first_frame = true;
calc_frame = true;
fuel_c = 1 / (_root["tank_" + tank_number].specials[10] + 1);
rounds = 0;
p_move = false;
select_target();
Symbol 310 MovieClip [ai_easy] Frame 2
if (_y > 400) {
_root["tank_" + tank_number].live = false;
_root["tank_" + tank_number].energy = 0;
_root["tank_" + tank_number].score = _root["tank_" + tank_number].score - 2000;
_root.hracu--;
if (_root["tank_" + tank_number].score < 0) {
_root["tank_" + tank_number].score = 0;
}
gotoAndPlay (4);
}
if (_root["tank_" + tank_number].energy <= 0) {
_root["tank_" + tank_number].energy = 0;
_root["tank_" + tank_number].live = false;
gotoAndPlay (4);
}
_root[_name + "_hlaven"]._x = _x;
_root[_name + "_hlaven"]._y = _y - 1;
if (sh_active) {
_root["shield" + tank_number]._x = _x;
_root["shield" + tank_number]._y = _y;
}
if (playing) {
if ((!target_.live) && (first_frame)) {
rounds = 1;
select_target();
}
if (rounds == 1) {
if (first_frame) {
i = 1;
while (_root.pocet_hracu >= i) {
if ((_root["tank" + i].playing && (i != tank_number)) && (_root["tank_" + i].live)) {
_root["tank" + i].playing = false;
_root.test();
}
i++;
}
first_shot = true;
calc_first_shot();
}
} else if (first_frame) {
calc_shot();
}
first_frame = false;
_root.rotace = rotace;
_root.power = power;
if (prepare_shot()) {
fire();
}
na_zemi = false;
left = true;
right = true;
i = 0;
min = 500;
gg = false;
test_hill();
while (i < _width) {
cur = _root["land" + Math.round((_x - (_width / 2)) + i)];
if (pasy.hitTest(cur)) {
na_zemi = true;
if (par_out) {
par_out = false;
_root["parachute" + tank_number].removeMovieClip();
}
if (fall > 0.4) {
if (fall < 0.8) {
damage(Math.round(fall * 25), this, true);
} else {
damage(Math.round((fall * fall) * 3000), this, true);
}
}
fall = 0;
}
top = cur._y - (cur._height / 2);
if ((top < min) && (na_zemi)) {
gg = true;
min = top;
}
if ((((i + 1) >= _width) && (na_zemi)) && (gg)) {
_y = (min - 2);
gg = false;
}
if (!na_zemi) {
if ((fall >= 0.2) && (par)) {
if (!par_active) {
par_active = true;
_root["tank_" + i].specials[0] = _root["tank_" + i].specials[0] - 1;
}
if (!par_out) {
_root.attachMovie("parachute", "parachute" + tank_number, 9000 + tank_number);
}
par_out = true;
}
_y = (_y + fall);
if (!par_out) {
fall = fall + 0.01;
} else {
_root["parachute" + tank_number]._x = _x;
_root["parachute" + tank_number]._y = _y - 7.5;
fall = 0.2;
_x = (_x + (_root.vitr / 3000));
}
}
i++;
}
if (_root["tank_" + tank_number].energy < power) {
power = _root["tank_" + tank_number].energy;
}
_root[_name + "_hlaven"]._rotation = rotace;
}
if (testing) {
i = 0;
min = 500;
gg = false;
test_hill();
while (i < _width) {
cur = _root["land" + Math.round((_x - (_width / 2)) + i)];
if (pasy.hitTest(cur)) {
if (fall > 0.4) {
if (fall < 0.8) {
damage(Math.round(fall * 25), this, true);
} else {
damage(Math.round((fall * fall) * 80), this, true);
}
}
if (par_out) {
par_out = false;
_root["parachute" + tank_number].removeMovieClip();
}
na_zemi = true;
fall = 0;
}
top = cur._y - (cur._height / 2);
if ((top < min) && (na_zemi)) {
gg = true;
min = top;
}
if ((((i + 1) >= _width) && (na_zemi)) && (gg)) {
_y = (min - 2);
gg = false;
}
if (fall > 0.001) {
test = false;
}
if (!na_zemi) {
if ((fall >= 0.2) && (par)) {
if (!par_active) {
par_active = true;
_root["tank_" + tank_number].specials[0] = _root["tank_" + tank_number].specials[0] - 1;
}
if (!par_out) {
_root.attachMovie("parachute", "parachute" + tank_number, 9000 + tank_number);
}
par_out = true;
}
_y = (_y + fall);
if (!par_out) {
fall = fall + 0.01;
} else {
_root["parachute" + tank_number]._x = _x;
_root["parachute" + tank_number]._y = _y - 7.5;
fall = 0.2;
_x = (_x + (_root.vitr / 3000));
}
}
i++;
}
if (fall > 0.001) {
test = false;
}
test_hill();
x3 = x2;
x2 = x1;
x1 = Math.round(_x);
y3 = y2;
y2 = y1;
y1 = Math.round(_y * 10) / 10;
if ((y1 == y3) && (x1 == x3)) {
test = true;
}
if (test) {
testing = false;
_root[_name + "test"] = false;
}
_root[_name + "_hlaven"]._x = _x;
_root[_name + "_hlaven"]._y = _y - 1;
test = true;
}
Symbol 310 MovieClip [ai_easy] Frame 3
gotoAndPlay (2);
Symbol 310 MovieClip [ai_easy] Frame 4
_root[_name + "_hlaven"].removeMovieClip();
_root["parachute" + tank_number].removeMovieClip();
_root["shield" + tank_number].removeMovieClip();
_root.hracu--;
Symbol 310 MovieClip [ai_easy] Frame 9
i = 0;
while (i < _width) {
cur = _root["land" + Math.round((_x - (_width / 2)) + i)];
x = cur._x;
y = cur._y;
h = cur._y - (cur._height / 2);
if (hitTest(x, h, true)) {
vzr = Math.cos(0.017 * (Math.sqrt(((_x - x) * (_x - x)) + ((_y - h) * (_y - h))) * (180 / _width)));
cur._height = cur._height - (30 * vzr);
cur._y = cur._y + (15 * vzr);
} else if (hitTest(_root["land" + Math.round((xx - (_width / 2)) + i)])) {
cur._height = cur._height - (50 / Math.abs(_x - x));
cur._y = cur._y + ((50 / Math.abs(_x - x)) / 2);
}
i++;
}
i = 1;
while (_root.pocet_hracu >= i) {
current = _root["tank" + i];
if ((hitTest(current) || (hitTest(_root["shield" + i]))) && (i != tank_number)) {
x = _x - current._x;
y = _y - current._y;
vzd = Math.sqrt((x * x) + (y * y));
if (!current.sh_active) {
damg = Math.round(_width / ((vzd + 1) / 14));
if (_root["tank_" + i].energy < damg) {
damg = _root["tank_" + i].energy;
}
} else {
damg = Math.round(_width / (((vzd / 2) + 1) / 18));
}
current.damage(damg, this);
}
i++;
}
Symbol 310 MovieClip [ai_easy] Frame 15
if (playing) {
_root.test();
}
stop();
Symbol 313 MovieClip [ai_very_easy] Frame 1
function test_hill() {
var _local1 = _root;
calc_hill_up();
if (((_local1["land" + Math.ceil(_x - (_width / 2))]._y - (_local1["land" + Math.ceil(_x - (_width / 2))]._height / 2)) < (_y - hill_up)) || ((_local1["land" + Math.floor(_x - (_width / 2))]._y - (_local1["land" + Math.floor(_x - (_width / 2))]._height / 2)) < (_y - hill_up))) {
_x = (_x + 0.7);
test = false;
left = false;
right = false;
} else if (((_local1["land" + Math.floor(_x + (_width / 2))]._y - (_local1["land" + Math.floor(_x + (_width / 2))]._height / 2)) < (_y - hill_up)) || ((_local1["land" + Math.ceil(_x + (_width / 2))]._y - (_local1["land" + Math.ceil(_x + (_width / 2))]._height / 2)) < (_y - hill_up))) {
left = false;
right = false;
_x = (_x - 0.7);
test = false;
} else {
left = true;
right = true;
}
}
function blik() {
var _local1 = _root;
_local1.attachMovie("blk", "blik", 10030);
_local1.blik._x = _x;
_local1.blik._y = _y - 10;
}
function calc_hill_up() {
hill_up = (0.5 + _root["tank_" + tank_number].specials[11]) - (fall * 10);
}
function move_left() {
var _local1 = _root;
_x = (_x - 0.5);
_local1["tank_" + tank_number].fuel = _local1["tank_" + tank_number].fuel - fuel_c;
moving = true;
i = 1;
while (i < (_local1.pocet_hracu + 1)) {
if (hitTest(_local1["tank" + i]) && (i != tank_number)) {
_x = (_x + 0.6);
}
i++;
}
}
function move_right() {
var _local1 = _root;
_x = (_x + 0.5);
_local1["tank_" + tank_number].fuel = _local1["tank_" + tank_number].fuel - fuel_c;
moving = true;
i = 1;
while (i < (_local1.pocet_hracu + 1)) {
if (hitTest(_local1["tank" + i]) && (i != tank_number)) {
_x = (_x - 0.6);
}
i++;
}
}
function activate_shield(shield) {
var _local1 = _root;
_local1.attachMovie(_local1.specials[2 + shield][4], "shield" + tank_number, 5040 + tank_number);
_local1["shield" + tank_number].num = tank_number;
_local1["tank_" + tank_number].specials[2 + shield]--;
sh_active = true;
_local1["t" + tank_number] = _local1["shield" + tank_number];
}
function disable_shield() {
var _local1 = _root;
_local1["shield" + tank_number].disable();
sh_active = false;
_local1["t" + tank_number] = _local1["tank" + tank_number];
}
function p_m(par) {
if (par > 0) {
return(1);
}
return(-1);
}
function calc_first_shot() {
var _local1 = _root;
_local1.z_ai_dif = "hard";
p_rotace = 90 + (p_m(target._x - _x) * 45);
p_x = _x;
p_power = Math.abs(_x - target._x) / (2 + (Math.abs(_x - target._x) / 120));
if (p_power >= _local1["tank_" + tank_number].energy) {
p_power = _local1["tank_" + tank_number].energy;
}
}
function calc_shot() {
var _local1 = _root;
last_shot_vzd = Math.sqrt(Math.abs((_x - last_shot_x) * (_x - last_shot_x)) + Math.abs((_y - last_shot_y) * (_y - last_shot_y)));
target_vzd = Math.sqrt(Math.abs((_x - target._x) * (_x - target._x)) + Math.abs((_y - target._y) * (_y - target._y)));
x_vzd = Math.abs(last_shot_x - target._x);
y_vzd = Math.abs(last_shot_y - target._y);
if ((power >= _local1["tank_" + tank_number].energy) || (power == 100)) {
full_power = true;
} else {
full_power = false;
}
wind_change_koef = 7;
wind_koef_vzd_koef = 380;
vzd_koef = 10.9;
vzd_koef_k = 7 + (Math.abs(_x - last_shot_x) / 80);
y_vzd_koef = 30;
y_koef = 22;
rot_r = 100 - ((200 - Math.abs(_x - target._x)) / 30);
rot_l = 80 + ((200 - Math.abs(_x - target._x)) / 30);
if (_x < target._x) {
wind_koef_vzd_koef = wind_koef_vzd_koef - ((180 - rotace) * 3);
y_koef = y_koef + ((135 - rotace) * 1.7);
if (last_shot_x < _x) {
_local1.z_f_used = "1.1";
p_rotace = p_rotace + ((((_x - last_shot_x) / 10) + ((target._x - _x) / 20)) - (_local1.vitr / 50));
} else if (((last_shot_vzd > 60) || (target_vzd < 70)) || (power < 10)) {
_local1.z_f_used = "1.2.1.failed";
if (last_shot_x >= target._x) {
if (x_vzd > 20) {
_local1.z_f_used = "1.2.1.1.1";
p_power = p_power - (((x_vzd / ((vzd_koef + 2.5) - (Math.abs(135 - rotace) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) - ((last_shot_y - target._y) / y_koef));
} else {
_local1.z_f_used = "1.2.1.1.2";
p_power = p_power - ((x_vzd / ((vzd_koef - 1) - (Math.abs(135 - rotace) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
}
} else if (last_shot_y < target._y) {
if (target._y < _y) {
if ((((((((_y - target._y) > 80) && (y_vzd < 80)) && (y_vzd > 20)) && (last_shot_vzd < 100)) && (target_vzd > 220)) && (power > 30)) && ((rot_r - (_local1.vitr / 7)) < rotace)) {
_local1.z_f_used = "1.2.1.2.1.1.1";
p_rotace = p_rotace - ((((rotace - (rot_r - (_local1.vitr / 7))) / 4) + (_local1.vitr / 20)) - (target_vzd / 100));
} else if (rotace < (rot_r - (_local1.vitr / 7))) {
_local1.z_f_used = "1.2.1.2.1.1.2.";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if ((y_vzd < 30) && (x_vzd < 200)) {
_local1.z_f_used = "1.2.1.2.1.1.3";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if (y_vzd >= 30) {
if ((((target._x - _x) > 300) && (power < 50)) && (rotace < 110)) {
_local1.z_f_used = "1.2.1.2.1.1.4.1";
p_power = p_power + ((x_vzd / (vzd_koef / 3)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
} else if ((rot_r - (_local1.vitr / 7)) < rotace) {
if (p_rotace <= 135) {
_local1.z_f_used = "1.2.1.2.1.1.4.2.1";
p_power = p_power + ((((((x_vzd / (vzd_koef * 2)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + (y_vzd / y_vzd_koef)) + ((135 - rotace) / 8)) - (_local1.vitr / 15)) + ((rotace - (rot_r - (_local1.vitr / 7))) / 8));
} else {
_local1.z_f_used = "1.2.1.2.1.1.4.2.2";
p_power = p_power + ((((x_vzd / (vzd_koef * 2)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + (y_vzd / y_vzd_koef)) - (_local1.vitr / 15));
}
p_rotace = p_rotace - (((rotace - (rot_r - (_local1.vitr / 7))) / 4.5) + (y_vzd / y_vzd_koef));
}
}
} else if ((((((((target._y - _y) < 70) && (y_vzd < 100)) && (y_vzd > 20)) && (last_shot_vzd < 100)) && (target_vzd > 250)) && (power > 30)) && ((rot_r - (_local1.vitr / 7)) < rotace)) {
_local1.z_f_used = "1.2.1.2.1.2.1";
p_rotace = p_rotace - ((((rotace - (rot_r - (_local1.vitr / 7))) / 4.5) + (_local1.vitr / 20)) - (target_vzd / 100));
} else if (rotace < (rot_r - (_local1.vitr / 7))) {
_local1.z_f_used = "1.2.1.2.1.2.2";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if ((y_vzd < 30) && (x_vzd < 200)) {
_local1.z_f_used = "1.2.1.2.1.2.3";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if (y_vzd >= 30) {
if (((target._y - _y) > 200) && (_y < last_shot_y)) {
_local1.z_f_used = "1.2.1.2.1.2.4.1";
if (p_rotace > 120) {
_local1.z_f_used = "1.2.1.2.1.2.4.1.1";
p_power = p_power + ((x_vzd / (vzd_koef / 1.5)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
} else {
_local1.z_f_used = "1.2.1.2.1.2.4.1.2";
p_power = p_power + ((x_vzd / (vzd_koef / 2)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
}
} else if ((((target._x - _x) > 300) && (power < 50)) && (rotace < 110)) {
_local1.z_f_used = "1.2.1.2.1.2.4.2.";
p_power = p_power + ((x_vzd / (vzd_koef / 3)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
} else if ((rot_r - (_local1.vitr / 7)) < rotace) {
if (p_rotace <= 135) {
_local1.z_f_used = "1.2.1.2.1.2.4.3.1.";
p_power = p_power + ((((((x_vzd / (vzd_koef * 2)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) - (y_vzd / y_vzd_koef)) + ((135 - rotace) / 8)) - (_local1.vitr / 15)) + ((rotace - (rot_r - (_local1.vitr / 7))) / 8));
} else {
_local1.z_f_used = "1.2.1.2.1.2.4.3.2.";
p_power = p_power + ((((x_vzd / (vzd_koef * 2)) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) - (y_vzd / y_vzd_koef)) - (_local1.vitr / 15));
}
p_rotace = p_rotace - (((rotace - (rot_r - (_local1.vitr / 7))) / 4.5) + (y_vzd / y_vzd_koef));
}
}
} else if ((((last_shot_vzd < 150) && ((target._x - _x) < 170)) || (last_shot_vzd >= 100)) || ((last_shot_vzd < 100) && (power < 30))) {
if (target._y < _y) {
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
_local1.z_f_used = "1.2.1.2.2.1.1";
} else if ((target._y - _y) > 100) {
_local1.z_f_used = "1.2.1.2.2.1.2.1";
p_power = p_power + ((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
} else {
_local1.z_f_used = "1.2.1.2.2.1.2.2";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
}
} else if (rotace < ((rot_r - 5) - (root.vitr / 7))) {
_local1.z_f_used = "1.2.1.2.2.2";
p_rotace = p_rotace + ((((135 - rotace) / 10) + target._x) - (_x / 100));
} else {
_local1.z_f_used = "1.2.1.2.2.3";
p_rotace = p_rotace - ((rotace - (rot_r - (_local1.vitr / 7))) / 2);
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(135 - rotace) / vzd_koef_k))) / 1.5) + ((rotace - (rot_r - (_local1.vitr / 7))) / 5));
}
} else if (((_y - target._y) > 100) && ((target._x - _x) < 100)) {
_local1.z_f_used = "1.2.2.1";
p_rotace = p_rotace - ((rotace - (rot_r - (_local1.vitr / 7))) / 2);
} else {
_local1.z_f_used = "1.2.2.2";
p_rotace = p_rotace - (((rotace - (rot_r - (_local1.vitr / 7))) / 2) - ((target._x - _x) / 100));
}
} else {
wind_koef_vzd_koef = wind_koef_vzd_koef - (rotace * 3);
y_koef = y_koef + ((rotace - 45) * 1.7);
if (_x < last_shot_x) {
_local1.z_f_used = "2.1";
p_rotace = p_rotace - ((((last_shot_x - _x) / 10) + ((_x - target._x) / 20)) + (_local1.vitr / 50));
} else if (((last_shot_vzd > 60) || (target_vzd < 70)) || (power < 10)) {
_local1.z_f_used = "2.2.1.failed";
if (target._x >= last_shot_x) {
if (x_vzd > 20) {
_local1.z_f_used = "2.2.1.1.1";
p_power = p_power - (((x_vzd / ((vzd_koef + 2.5) - (Math.abs(45 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) - ((last_shot_y - target._y) / y_koef));
} else {
_local1.z_f_used = "2.2.1.1.2";
p_power = p_power - ((x_vzd / ((vzd_koef - 1) - (Math.abs(45 - rotace) / vzd_koef_k))) - ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
}
} else if (last_shot_y < target._y) {
if (target._y < _y) {
if ((((((((_y - target._y) > 80) && (y_vzd < 80)) && (y_vzd > 20)) && (last_shot_vzd < 100)) && (target_vzd > 220)) && (power > 30)) && ((rot_l + (_local1.vitr / 7)) < rotace)) {
_local1.z_f_used = "2.2.1.2.1.1.1";
p_rotace = p_rotace + (((((rot_l + (_local1.vitr / 7)) - rotace) / 4) - (_local1.vitr / 20)) - (target_vzd / 100));
} else if ((rot_l + (_local1.vitr / 7)) < rotace) {
_local1.z_f_used = "2.2.1.2.1.1.2";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(rotace - 45) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(_x - last_shot_x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if ((y_vzd < 30) && (x_vzd < 200)) {
_local1.z_f_used = "2.2.1.2.1.1.3";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(rotace - 45) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(_x - last_shot_x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if (y_vzd >= 30) {
if ((((_x - target._x) > 300) && (power < 50)) && (rotace > 70)) {
_local1.z_f_used = "2.2.1.2.1.1.4.1";
p_power = p_power + ((x_vzd / (vzd_koef / 3)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(_x - last_shot_x) / wind_koef_vzd_koef))));
} else if (rotace < (rot_l + (_local1.vitr / 7))) {
if (p_rotace >= 45) {
_local1.z_f_used = "2.2.1.2.1.1.4.2.1";
p_power = p_power + ((((((x_vzd / (vzd_koef * 2)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + (y_vzd / y_vzd_koef)) + ((rotace - 45) / 8)) + (_local1.vitr / 15)) + (((rot_l + (_local1.vitr / 7)) - rotace) / 8));
} else {
_local1.z_f_used = "2.2.1.2.1.1.4.2.2";
p_power = p_power + ((((x_vzd / (vzd_koef * 2)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + (y_vzd / y_vzd_koef)) + (_local1.vitr / 15));
}
p_rotace = p_rotace + ((((rot_l + (_local1.vitr / 7)) - rotace) / 4.5) + (y_vzd / y_vzd_koef));
}
}
} else if ((((((((target._y - _y) < 70) && (y_vzd < 100)) && (y_vzd > 20)) && (last_shot_vzd < 100)) && (target_vzd > 250)) && (power > 30)) && (rotace < (rot_l - (_local1.vitr / 7)))) {
_local1.z_f_used = "2.2.1.2.1.2.1";
p_rotace = p_rotace + (((((rot_l + (_local1.vitr / 7)) - rotace) / 4.5) - (_local1.vitr / 20)) - (target_vzd / 100));
} else if ((rot_l + (_local1.vitr / 7)) < rotace) {
_local1.z_f_used = "2.2.1.2.1.2.2";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(rotace - 45) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(_x - last_shot_x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if ((y_vzd < 30) && (x_vzd < 200)) {
_local1.z_f_used = "2.2.1.2.1.2.3";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(45 - rotace) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
} else if (y_vzd >= 30) {
if (((target._y - _y) > 200) && (_y < last_shot_y)) {
if (p_rotace < 60) {
_local1.z_f_used = "2.2.1.2.1.2.4.1.1";
p_power = p_power + ((x_vzd / (vzd_koef / 1.5)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
} else {
_local1.z_f_used = "2.2.1.2.1.2.4.1.2";
p_power = p_power + ((x_vzd / (vzd_koef / 2)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
}
} else if ((((_x - target._x) > 300) && (power < 50)) && (rotace > 70)) {
_local1.z_f_used = "2.2.1.2.1.2.4.2";
p_power = p_power + ((x_vzd / (vzd_koef / 3)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
} else if (rotace < (rot_l + (_local1.vitr / 7))) {
if (p_rotace >= 45) {
_local1.z_f_used = "2.2.1.2.1.2.4.3.1";
p_power = p_power + ((((((x_vzd / (vzd_koef * 2)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + (y_vzd / y_vzd_koef)) + ((rotace - 45) / 8)) + (_local1.vitr / 15)) + (((rot_l + (_local1.vitr / 7)) - rotace) / 8));
} else {
_local1.z_f_used = "2.2.1.2.1.2.4.3.2";
p_power = p_power + ((((x_vzd / (vzd_koef * 2)) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + (y_vzd / y_vzd_koef)) + (_local1.vitr / 15));
}
p_rotace = p_rotace + ((((rot_l + (_local1.vitr / 7)) - rotace) / 4.5) + (y_vzd / y_vzd_koef));
}
}
} else if ((((last_shot_vzd < 150) && ((_x - target._x) < 170)) || (last_shot_vzd >= 100)) || ((last_shot_vzd < 100) && (power < 30))) {
if (target._y < _y) {
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(rotace - 45) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
_local1.z_f_used = "2.2.1.2.2.1.1";
} else if ((target._y - _y) > 100) {
_local1.z_f_used = "2.2.1.2.2.1.2.1";
p_power = p_power + ((x_vzd / (vzd_koef - (Math.abs(rotace - 45) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef))));
} else {
_local1.z_f_used = "2.2.1.2.2.1.2.2";
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(rotace - 45) / vzd_koef_k))) + ((_local1.vitr - last_wind) / (wind_change_koef - (Math.abs(last_shot_x - _x) / wind_koef_vzd_koef)))) + ((last_shot_y - target._y) / y_koef));
}
} else if (rotace < ((rot_l + 5) + (root.vitr / 7))) {
_local1.z_f_used = "2.2.1.2.2.2";
p_rotace = p_rotace - ((((rotace - 45) / 10) + _x) - (target._x / 100));
} else {
_local1.z_f_used = "2.2.1.2.2.3";
p_rotace = p_rotace + (((rot_l + (_local1.vitr / 7)) - rotace) / 3);
p_power = p_power + (((x_vzd / (vzd_koef - (Math.abs(rotace - 45) / vzd_koef_k))) / 1.5) + (((rot_l + (_local1.vitr / 7)) - rotace) / 5));
}
} else if (((_y - target._y) > 100) && ((_x - target._x) < 100)) {
_local1.z_f_used = "2.2.2.1";
p_rotace = p_rotace + (((rot_l + (_local1.vitr / 7)) - rotace) / 2);
} else {
_local1.z_f_used = "2.2.2.2";
p_rotace = p_rotace + ((((rot_l + (_local1.vitr / 7)) - rotace) / 2) - ((target._x - _x) / 100));
}
}
if (p_power > 100) {
p_power = 100;
}
if (p_power >= _local1["tank_" + tank_number].energy) {
p_power = _local1["tank_" + tank_number].energy;
if (_x < target._x) {
if (p_rotace < 135) {
if (p_power > 70) {
p_power = p_power - ((135 - p_rotace) / 2.5);
}
p_rotace = p_rotace + ((135 - p_rotace) / 3);
}
} else if (p_rotace > 45) {
if (p_power > 70) {
p_power = p_power - ((p_rotace - 45) / 2.5);
}
p_rotace = p_rotace - ((p_rotace - 45) / 3);
}
}
if (p_power < 0) {
p_power = 0;
}
if (p_rotace < 0) {
p_rotace = 0;
} else if (p_rotace > 180) {
p_rotace = 180;
}
}
function prepare_shot() {
var _local1 = _root;
prep = true;
if ((Math.max(rotace, p_rotace) - Math.min(rotace, p_rotace)) < 10) {
sp = 1;
} else {
sp = Math.floor((Math.max(rotace, p_rotace) - Math.min(rotace, p_rotace)) / 10);
}
if (Math.ceil(rotace) != Math.ceil(p_rotace)) {
if ((Math.ceil(p_rotace) < Math.ceil(rotace)) && ((rotace - sp) >= 0)) {
prep = false;
rotace = rotace - sp;
_local1.tur.play();
} else if ((rotace + sp) <= 180) {
prep = false;
rotace = rotace + sp;
_local1.tur.play();
}
}
if (Math.ceil(power) != Math.ceil(p_power)) {
if ((Math.ceil(p_power) < Math.ceil(power)) && ((power - sp) >= 0)) {
prep = false;
power = power - sp;
} else if ((power + sp) <= 180) {
prep = false;
power = power + sp;
}
}
if (((Math.round(p_x) != Math.round(_x)) && (_local1["tank_" + tank_number].fuel > 0)) && (p_move)) {
prep = false;
if (Math.round(p_x) < Math.round(_x)) {
move_right();
} else {
move_left();
}
}
if (prep) {
return(true);
}
return(undefined);
}
function select_target() {
var _local1 = _root;
vzd = 1000;
i = 1;
while (_local1.pocet_hracu >= i) {
vz = Math.abs(_x - _local1["tank" + i]._x);
if (((vz < vzd) && (i != tank_number)) && (_local1["tank_" + i].live)) {
vzd = vz;
target = _local1["tank" + i];
target_ = _local1["tank_" + i];
}
i++;
}
}
function na_rade() {
rounds++;
par_active = false;
calc_hill_up();
}
function damage(damag, attacker, par) {
var _local1 = _root;
var _local2 = attacker;
var _local3 = damag;
armor = 1;
arm = 1;
i = 0;
while (i < _local1["tank_" + tank_number].specials[9]) {
armor = armor / (1.12 / arm);
arm = arm / 1.0002;
i++;
}
if ((!sh_active) || (par)) {
_local1["tank_" + tank_number].energy = _local1["tank_" + tank_number].energy - (_local3 * armor);
} else {
_local1["shield" + tank_number].damage(_local3, _local2);
}
if (_local1["tank_" + tank_number].energy <= 0) {
if (this != _local2) {
_local1["tank_" + _local2.tank_number].kills = _local1["tank_" + _local2.tank_number].kills + 1;
_local1["tank_" + _local2.tank_number].score = _local1["tank_" + _local2.tank_number].score + 5000;
_local1["tank_" + _local2.tank_number].total_score = _local1["tank_" + _local2.tank_number].total_score + 5000;
} else {
_local1["tank_" + tank_number].kills = _local1["tank_" + tank_number].kills - 1;
_local1["tank_" + tank_number].score = _local1["tank_" + tank_number].score - 2000;
_local1["tank_" + tank_number].total_score = _local1["tank_" + tank_number].total_score - 2000;
}
}
if (this != _local2) {
_local1["tank_" + _local2.tank_number].score = _local1["tank_" + _local2.tank_number].score + (_local3 * 100);
_local1["tank_" + _local2.tank_number].total_score = _local1["tank_" + _local2.tank_number].total_score + (_local3 * 100);
} else {
if (par) {
_local3 = _local3 / 3;
}
_local1["tank_" + tank_number].score = _local1["tank_" + tank_number].score - Math.round(_local3 * 50);
_local1["tank_" + tank_number].total_score = _local1["tank_" + tank_number].total_score - Math.round(_local3 * 50);
if (_local1["tank_" + tank_number].score < 0) {
_local1["tank_" + tank_number].score = 0;
}
}
}
function fire() {
var _local1 = _root;
if (_local1.debugging) {
save_inf();
}
last_wind = _local1.vitr;
first_frame = true;
_local1.attachMovie(_local1.weapons[_local1["tank_" + tank_number].cur_gun][4], "strela", 1000);
if (_local1["tank_" + tank_number].cur_gun != 0) {
_local1["tank_" + tank_number].guns[_local1["tank_" + tank_number].cur_gun]--;
if (_local1["tank_" + tank_number].guns[_local1["tank_" + tank_number].cur_gun] == 0) {
_local1["tank_" + tank_number].cur_gun = 0;
}
}
_local1.strela._rotation = rotace - 90;
_local1.strela._x = _x;
_local1.strela._y = _y - 1;
_local1.strela.strela.vo = power;
_local1.strela.strela.owner = _local1[_name];
_local1[_name + "_hlaven"].play();
playing = false;
}
function save_inf() {
var _local1 = _root;
_local1.z_target = target;
_local1.z_target_name = target_.name;
_local1.z_target_energy = target_.energy;
_local1.z_target_live = target_.live;
_local1.z_name = _local1["tank_" + tank_number].name;
_local1.z_energy = _local1["tank_" + tank_number].energy;
if (target._x < _x) {
_local1.z_pos = "right";
} else {
_local1.z_pos = "left";
}
_local1.z_x = _x;
_local1.z_y = _y;
_local1.z_tar_x = target._x;
_local1.z_tar_y = target._y;
_local1.z_last_vitr = last_wind;
_local1.z_vitr = _local1.vitr;
_local1.z_wind_koef_vzd_koef = wind_koef_vzd_koef;
_local1.z_angle = rotace;
_local1.z_power = power;
_local1.z_y_koef = y_koef;
_local1.z_vzd_koef_k = vzd_koef_k;
_local1.z_last_shot_x = last_shot_x;
_local1.z_last_shot_y = last_shot_y;
_local1.z_last_shot_vzd = last_shot_vzd;
_local1.z_last_shot_y_vzd = y_vzd;
_local1.z_last_shot_x_vzd = x_vzd;
_local1.z_dif = dif;
fscommand ("SAVE", ((((((("debug/" add _local1.game) add "_") add rounds) add "_") add _local1.z_pos) add "_") add _local1["tank_" + tank_number].name) add ".txt");
}
dif = _root["tank_" + tank_number].dif;
_y = ((_root["land" + Math.round(_x)]._y - (_root["land" + Math.round(_x)]._height / 2)) - 4);
i = 0;
while (i < _width) {
cur = _root["land" + Math.floor((_x - (_width / 2)) + i)];
if (hitTest(cur)) {
cur._y = cur._y + ((_y + (_height / 2)) - (cur._y - (cur._height / 2)));
}
i++;
}
if (_root["tank_" + tank_number].specials[0] > 0) {
par = true;
}
_root.attachMovie("hlaven", _name + "_hlaven", 10010 + tank_number);
rotace = (random(67) * 2) + 46;
_root[_name + "_hlaven"]._x = _x;
_root[_name + "_hlaven"]._y = _y - 1;
_root[_name + "_hlaven"]._rotation = rotace;
power = 50;
playing = false;
testing = false;
par_active = false;
par_out = false;
par_used = false;
sh_active = false;
_root["t" + tank_number] = _root["tank" + tank_number];
first_shot = true;
first_frame = true;
calc_frame = true;
fuel_c = 1 / (_root["tank_" + tank_number].specials[10] + 1);
rounds = 0;
p_move = false;
select_target();
Symbol 313 MovieClip [ai_very_easy] Frame 2
if (_y > 400) {
_root["tank_" + tank_number].live = false;
_root["tank_" + tank_number].energy = 0;
_root["tank_" + tank_number].score = _root["tank_" + tank_number].score - 2000;
_root.hracu--;
if (_root["tank_" + tank_number].score < 0) {
_root["tank_" + tank_number].score = 0;
}
gotoAndPlay (4);
}
if (_root["tank_" + tank_number].energy <= 0) {
_root["tank_" + tank_number].energy = 0;
_root["tank_" + tank_number].live = false;
gotoAndPlay (4);
}
_root[_name + "_hlaven"]._x = _x;
_root[_name + "_hlaven"]._y = _y - 1;
if (sh_active) {
_root["shield" + tank_number]._x = _x;
_root["shield" + tank_number]._y = _y;
}
if (playing) {
if ((!target_.live) && (first_frame)) {
rounds = 1;
select_target();
}
if (rounds == 1) {
if (first_frame) {
i = 1;
while (_root.pocet_hracu >= i) {
if ((_root["tank" + i].playing && (i != tank_number)) && (_root["tank_" + i].live)) {
_root["tank" + i].playing = false;
_root.test();
}
i++;
}
first_shot = true;
calc_first_shot();
}
} else if (first_frame) {
calc_shot();
}
first_frame = false;
_root.rotace = rotace;
_root.power = power;
if (prepare_shot()) {
fire();
}
na_zemi = false;
left = true;
right = true;
i = 0;
min = 500;
gg = false;
test_hill();
while (i < _width) {
cur = _root["land" + Math.round((_x - (_width / 2)) + i)];
if (pasy.hitTest(cur)) {
na_zemi = true;
if (par_out) {
par_out = false;
_root["parachute" + tank_number].removeMovieClip();
}
if (fall > 0.4) {
if (fall < 0.8) {
damage(Math.round(fall * 25), this, true);
} else {
damage(Math.round((fall * fall) * 3000), this, true);
}
}
fall = 0;
}
top = cur._y - (cur._height / 2);
if ((top < min) && (na_zemi)) {
gg = true;
min = top;
}
if ((((i + 1) >= _width) && (na_zemi)) && (gg)) {
_y = (min - 2);
gg = false;
}
if (!na_zemi) {
if ((fall >= 0.2) && (par)) {
if (!par_active) {
par_active = true;
_root["tank_" + i].specials[0] = _root["tank_" + i].specials[0] - 1;
}
if (!par_out) {
_root.attachMovie("parachute", "parachute" + tank_number, 9000 + tank_number);
}
par_out = true;
}
_y = (_y + fall);
if (!par_out) {
fall = fall + 0.01;
} else {
_root["parachute" + tank_number]._x = _x;
_root["parachute" + tank_number]._y = _y - 7.5;
fall = 0.2;
_x = (_x + (_root.vitr / 3000));
}
}
i++;
}
if (_root["tank_" + tank_number].energy < power) {
power = _root["tank_" + tank_number].energy;
}
_root[_name + "_hlaven"]._rotation = rotace;
}
if (testing) {
i = 0;
min = 500;
gg = false;
test_hill();
while (i < _width) {
cur = _root["land" + Math.round((_x - (_width / 2)) + i)];
if (pasy.hitTest(cur)) {
if (fall > 0.4) {
if (fall < 0.8) {
damage(Math.round(fall * 25), this, true);
} else {
damage(Math.round((fall * fall) * 80), this, true);
}
}
if (par_out) {
par_out = false;
_root["parachute" + tank_number].removeMovieClip();
}
na_zemi = true;
fall = 0;
}
top = cur._y - (cur._height / 2);
if ((top < min) && (na_zemi)) {
gg = true;
min = top;
}
if ((((i + 1) >= _width) && (na_zemi)) && (gg)) {
_y = (min - 2);
gg = false;
}
if (fall > 0.001) {
test = false;
}
if (!na_zemi) {
if ((fall >= 0.2) && (par)) {
if (!par_active) {
par_active = true;
_root["tank_" + tank_number].specials[0] = _root["tank_" + tank_number].specials[0] - 1;
}
if (!par_out) {
_root.attachMovie("parachute", "parachute" + tank_number, 9000 + tank_number);
}
par_out = true;
}
_y = (_y + fall);
if (!par_out) {
fall = fall + 0.01;
} else {
_root["parachute" + tank_number]._x = _x;
_root["parachute" + tank_number]._y = _y - 7.5;
fall = 0.2;
_x = (_x + (_root.vitr / 3000));
}
}
i++;
}
if (fall > 0.001) {
test = false;
}
test_hill();
x3 = x2;
x2 = x1;
x1 = Math.round(_x);
y3 = y2;
y2 = y1;
y1 = Math.round(_y * 10) / 10;
if ((y1 == y3) && (x1 == x3)) {
test = true;
}
if (test) {
testing = false;
_root[_name + "test"] = false;
}
_root[_name + "_hlaven"]._x = _x;
_root[_name + "_hlaven"]._y = _y - 1;
test = true;
}
Symbol 313 MovieClip [ai_very_easy] Frame 3
gotoAndPlay (2);
Symbol 313 MovieClip [ai_very_easy] Frame 4
_root[_name + "_hlaven"].removeMovieClip();
_root["parachute" + tank_number].removeMovieClip();
_root["shield" + tank_number].removeMovieClip();
_root.hracu--;
Symbol 313 MovieClip [ai_very_easy] Frame 9
i = 0;
while (i < _width) {
cur = _root["land" + Math.round((_x - (_width / 2)) + i)];
x = cur._x;
y = cur._y;
h = cur._y - (cur._height / 2);
if (hitTest(x, h, true)) {
vzr = Math.cos(0.017 * (Math.sqrt(((_x - x) * (_x - x)) + ((_y - h) * (_y - h))) * (180 / _width)));
cur._height = cur._height - (30 * vzr);
cur._y = cur._y + (15 * vzr);
} else if (hitTest(_root["land" + Math.round((xx - (_width / 2)) + i)])) {
cur._height = cur._height - (50 / Math.abs(_x - x));
cur._y = cur._y + ((50 / Math.abs(_x - x)) / 2);
}
i++;
}
i = 1;
while (_root.pocet_hracu >= i) {
current = _root["tank" + i];
if ((hitTest(current) || (hitTest(_root["shield" + i]))) && (i != tank_number)) {
x = _x - current._x;
y = _y - current._y;
vzd = Math.sqrt((x * x) + (y * y));
if (!current.sh_active) {
damg = Math.round(_width / ((vzd + 1) / 14));
if (_root["tank_" + i].energy < damg) {
damg = _root["tank_" + i].energy;
}
} else {
damg = Math.round(_width / (((vzd / 2) + 1) / 18));
}
current.damage(damg, this);
}
i++;
}
Symbol 313 MovieClip [ai_very_easy] Frame 15
if (playing) {
_root.test();
}
stop();
Symbol 315 MovieClip [strom_1] Frame 1
_x = random(550);
_y = (_root["land" + _x]._y - (_root["land" + _x]._height / 2));
fall = 0;
Symbol 315 MovieClip [strom_1] Frame 2
if (Math.floor(_y) < Math.floor(_root["land" + _x]._y - (_root["land" + _x]._height / 2))) {
_y = (_y + fall);
fall = fall + 1;
} else {
fall = 0;
}
Symbol 315 MovieClip [strom_1] Frame 3
gotoAndPlay (2);
Symbol 317 MovieClip [strom_2] Frame 1
_y = (_root["land" + _x]._y - (_root["land" + _x]._height / 2));
fall = 0;
Symbol 317 MovieClip [strom_2] Frame 2
if (_y < (_root["land" + _x]._y - (_root["land" + _x]._height / 2))) {
_y = (_y + fall);
fall = fall + 1;
} else {
fall = 0;
}
Symbol 317 MovieClip [strom_2] Frame 3
gotoAndPlay (2);
Symbol 327 Button
on (release) {
if (!_root.released) {
m1.gotoAndStop(2);
m2.gotoAndStop(1);
m3.gotoAndStop(1);
m4.gotoAndStop(1);
_root.krajina = 1;
}
}
Symbol 328 Button
on (release) {
if (!_root.released) {
m1.gotoAndStop(1);
m2.gotoAndStop(2);
m3.gotoAndStop(1);
m4.gotoAndStop(1);
_root.krajina = 2;
}
}
Symbol 329 Button
on (release) {
if (!_root.released) {
m1.gotoAndStop(1);
m2.gotoAndStop(1);
m3.gotoAndStop(2);
m4.gotoAndStop(1);
_root.krajina = 3;
}
}
Symbol 330 Button
on (release) {
if (!_root.released) {
m1.gotoAndStop(1);
m2.gotoAndStop(1);
m3.gotoAndStop(1);
m4.gotoAndStop(2);
_root.krajina = 0;
}
}
Instance of Symbol 157 MovieClip "m4" in Symbol 331 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (2);
}
Symbol 335 Button
on (release, keyPress "<Enter>") {
if (!released) {
_root.attachMovie("clona", "clona", 1000001);
_root.clona._x = 275;
_root.clona._y = 200;
_root.clona.projizdi = true;
_root.clona.frame = 2;
_root.clona.stops = true;
released = true;
}
}
Symbol 342 Button
on (release) {
if (_root.pocet_hracu < 500) {
_root.pocet_hracu++;
pocet = _root.pocet_hracu;
}
}
Symbol 343 Button
on (release) {
if (_root.pocet_hracu > 2) {
_root.pocet_hracu--;
pocet = _root.pocet_hracu;
}
}
Symbol 344 MovieClip Frame 1
pocet = _root.pocet_hracu;
Symbol 347 MovieClip Frame 1
stop();
Symbol 360 MovieClip Frame 1
stop();
Symbol 361 Button
on (release) {
if (!_root.released) {
if (type == "tank") {
type = "ai";
check.gotoAndStop(2);
} else {
type = "tank";
check.gotoAndStop(1);
}
}
}
Symbol 366 Button
on (release) {
if (!_root.released) {
m1.gotoAndStop(2);
m2.gotoAndStop(1);
m3.gotoAndStop(1);
m4.gotoAndStop(1);
m5.gotoAndStop(1);
m6.gotoAndStop(1);
_root.col = 15737856 /* 0xF02400 */;
}
}
Symbol 367 Button
on (release) {
if (!_root.released) {
m1.gotoAndStop(1);
m2.gotoAndStop(2);
m3.gotoAndStop(1);
m4.gotoAndStop(1);
m5.gotoAndStop(1);
m6.gotoAndStop(1);
_root.col = 52275;
}
}
Symbol 368 Button
on (release) {
if (!_root.released) {
m1.gotoAndStop(1);
m2.gotoAndStop(1);
m3.gotoAndStop(2);
m4.gotoAndStop(1);
m5.gotoAndStop(1);
m6.gotoAndStop(1);
_root.col = 13311;
}
}
Symbol 369 Button
on (release) {
if (!_root.released) {
m1.gotoAndStop(1);
m2.gotoAndStop(1);
m3.gotoAndStop(1);
m4.gotoAndStop(2);
m5.gotoAndStop(1);
m6.gotoAndStop(1);
_root.col = 3355443 /* 0x333333 */;
}
}
Symbol 370 Button
on (release) {
if (!_root.released) {
m1.gotoAndStop(1);
m2.gotoAndStop(1);
m3.gotoAndStop(1);
m4.gotoAndStop(1);
m5.gotoAndStop(2);
m6.gotoAndStop(1);
_root.col = 15785743 /* 0xF0DF0F */;
}
}
Symbol 371 Button
on (release) {
if (!_root.released) {
m1.gotoAndStop(1);
m2.gotoAndStop(1);
m3.gotoAndStop(1);
m4.gotoAndStop(1);
m5.gotoAndStop(1);
m6.gotoAndStop(2);
_root.col = 15373056 /* 0xEA9300 */;
}
}
Instance of Symbol 157 MovieClip "m4" in Symbol 372 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (2);
}
Instance of Symbol 157 MovieClip "m5" in Symbol 372 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
}
Instance of Symbol 157 MovieClip "m6" in Symbol 372 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
}
Symbol 374 Button
on (release, keyPress "<Enter>") {
if (pocet_hracu >= cur) {
if (_root.name != "") {
_root["tank_" + cur].name = _root.name;
} else {
_root["tank_" + cur].name = "Player " + cur;
}
_root["tank_" + cur].col = _root.col;
_root["tank_" + cur].type = type;
if (type == "ai") {
_root["tank_" + cur].dif = dif;
}
_root.name = "";
cur++;
if (pocet_hracu >= cur) {
cislo = "Player " + cur;
} else {
gotoAndPlay (3);
}
if (cur == pocet_hracu) {
_root.uk = "START ! ";
}
}
}
Symbol 383 Button
on (release) {
if (!_root.released) {
m1.gotoAndStop(2);
m2.gotoAndStop(1);
m3.gotoAndStop(1);
m4.gotoAndStop(1);
m5.gotoAndStop(1);
m6.gotoAndStop(1);
_root.dif = "Very_easy";
}
}
Symbol 384 Button
on (release) {
if (!_root.released) {
m1.gotoAndStop(1);
m2.gotoAndStop(2);
m3.gotoAndStop(1);
m4.gotoAndStop(1);
m5.gotoAndStop(1);
m6.gotoAndStop(1);
_root.dif = "easy";
}
}
Symbol 385 Button
on (release) {
if (!_root.released) {
m1.gotoAndStop(1);
m2.gotoAndStop(1);
m3.gotoAndStop(2);
m4.gotoAndStop(1);
m5.gotoAndStop(1);
m6.gotoAndStop(1);
_root.dif = "normal";
}
}
Symbol 386 Button
on (release) {
if (!_root.released) {
m1.gotoAndStop(1);
m2.gotoAndStop(1);
m3.gotoAndStop(1);
m4.gotoAndStop(2);
m5.gotoAndStop(1);
m6.gotoAndStop(1);
_root.dif = "hard";
}
}
Symbol 387 Button
on (release) {
if (!_root.released) {
m1.gotoAndStop(1);
m2.gotoAndStop(1);
m3.gotoAndStop(1);
m4.gotoAndStop(1);
m5.gotoAndStop(2);
m6.gotoAndStop(1);
_root.dif = "very_hard";
}
}
Instance of Symbol 157 MovieClip "m3" in Symbol 388 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (2);
}
Instance of Symbol 157 MovieClip "m5" in Symbol 388 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
}
Symbol 395 MovieClip Frame 1
stop();
Symbol 397 MovieClip Frame 1
stop();
Symbol 397 MovieClip Frame 36
i = 0;
while (i <= 550) {
_root["land" + i].removeMovieClip();
i++;
}
i = 0;
while (i < 100) {
_root["strom" + i].removeMovieClip();
i++;
}
i = 1;
while (_root.pocet_hracu >= i) {
_root["shield" + i].removeMovieClip();
_root["parachute" + i].removeMovieClip();
_root["tank" + i].removeMovieClip();
_root[("tank" + i) + "_hlaven"].removeMovieClip();
_root["tank_" + i].fuel = _root["tank_" + i].specials[2];
i++;
}
_root.strela.removeMovieClip();
_root.attachMovie("clona", "clona", 1000001);
_root.clona._x = 275;
_root.clona._y = 200;
_root.clona.purchasing = true;
_root.vitr = 0;
_root.pozadi.slunce.gotoAndStop(1);
_root.clona.ch = true;
_root.clona.speed = 10;
_root.clona.speed = 10;
_root.clona.k = 2340;
_root.clona.k = 2340;