Frame 5
_root.game_modo = 4;
gotoAndPlay ("start");
Frame 6
if (quality_is_set != 1337) {
quality_is_set = 1337;
_root.global_quality = 3;
}
fscommand ("fullscreen", "false");
fscommand ("allowscale", "false");
fscommand ("showmenu", "false");
stop();
timeA = 0;
median_fps_sum = 0;
median_fps_mod = 5;
median_fps_count = 0;
median_fps_sum2 = 0;
median_fps_mod2 = 25;
median_fps_count2 = 0;
onEnterFrame = function () {
urla = _url;
dvach = "http://2ch.ru/f/src/";
if (urla.indexOf(dvach) != -1) {
} else {
DESU.gotoAndStop(2);
gotoAndStop (7);
}
timeB = getTimer();
var _local3 = Math.floor(1000 / (this.timeB - this.timeA));
timeA = timeB;
if (median_fps_count < median_fps_mod) {
median_fps_count++;
median_fps_sum = median_fps_sum + _local3;
} else {
this.current_fps = Math.floor(median_fps_sum / this.median_fps_count);
this.median_fps_sum = 0;
this.median_fps_count = 0;
}
if (median_fps_count2 < median_fps_mod2) {
median_fps_count2++;
median_fps_sum2 = median_fps_sum2 + _local3;
} else {
this.current_fps2 = Math.floor(median_fps_sum2 / this.median_fps_count2);
this.median_fps_sum2 = 0;
this.median_fps_count2 = 0;
}
if (_root.all_sound_off eq 1) {
sound = new Sound();
sound.setVolume(0);
} else {
sound = new Sound();
sound.setVolume(100);
}
};
stop();
Symbol 106 MovieClip Frame 15
stop();
Symbol 110 MovieClip Frame 1
stop();
Symbol 111 MovieClip Frame 1
stop();
Instance of Symbol 91 MovieClip in Symbol 111 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(random(87) + 1);
}
Instance of Symbol 91 MovieClip in Symbol 111 MovieClip Frame 11
onClipEvent (load) {
gotoAndStop(random(87) + 1);
}
Instance of Symbol 91 MovieClip in Symbol 111 MovieClip Frame 15
onClipEvent (load) {
gotoAndStop(random(87) + 1);
}
Symbol 113 Button
on (press) {
damage = 100000000000000;
}
Symbol 114 MovieClip Frame 1
if (_name eq "enemy") {
gotoAndStop (3);
}
if (_name != "enemy") {
if ((allset != 1) and (gooo eq 1)) {
allset = 1;
hacked = 0;
hacked_timer = 0;
being_thrown = 0;
being_thrown_timer = 0;
the_core.health_bar._visible = false;
speed_k = 0.94;
if (unit_chosen eq 0) {
exp_points = 1;
var score = 50;
speed_k = 0.96;
the_core.gotoAndStop(2);
mass = 35;
size = "small";
power = 1;
hp = _root.small_tank_hp;
} else if (unit_chosen eq 1) {
exp_points = 2;
var score = 100;
speed_k = 0.96;
the_core.gotoAndStop(1);
mass = 50;
size = "medium";
power = 2;
hp = _root.lazer_tank_hp;
} else if (unit_chosen eq 2) {
exp_points = 1;
var score = 50;
speed_k = 0.96;
the_core.gotoAndStop(3);
mass = 25;
size = "small";
power = 1;
hp = _root.hover_tank_hp;
} else if (unit_chosen eq 3) {
if (second_modification eq 1) {
exp_points = 6;
var score = 700;
speed_k = 0.89;
_root.trace_mammoth = _name;
the_core.gotoAndStop(14);
mass = 750;
size = "hueg";
power = 5;
hp = _root.mammoth_tank2_hp;
} else {
exp_points = 5;
var score = 500;
speed_k = 0.89;
_root.trace_mammoth = _name;
the_core.gotoAndStop(4);
mass = 550;
size = "hueg";
power = 5;
hp = _root.mammoth_tank_hp;
}
} else if (unit_chosen eq 4) {
exp_points = 3;
var score = 100;
_root.heavy_tank_count++;
the_core.gotoAndStop(5);
mass = 170;
size = "big";
power = 3;
hp = _root.heavy_tank_hp;
} else if (unit_chosen eq 5) {
exp_points = 1;
var score = 50;
speed_k = 0.96;
the_core.gotoAndStop(6);
mass = 20;
size = "small";
power = 1;
hp = _root.railgrav_tank_hp;
} else if (unit_chosen eq 6) {
exp_points = 3;
var score = 200;
the_core.gotoAndStop(7);
mass = 150;
size = "big";
power = 3;
hp = _root.nuketruck_hp;
} else if (unit_chosen eq 7) {
exp_points = 1;
var score = 60;
speed_k = 0.96;
the_core.gotoAndStop(8);
mass = 25;
size = "small";
power = 1;
hp = _root.mech1_hp;
} else if (unit_chosen eq 8) {
exp_points = 2;
var score = 110;
the_core.gotoAndStop(9);
mass = 90;
size = "big";
power = 3;
hp = _root.black_tank_hp;
} else if (unit_chosen eq 9) {
exp_points = 3;
var score = 130;
the_core.gotoAndStop(10);
mass = 130;
size = "big";
power = 3;
hp = _root.mech2_hp;
} else if (unit_chosen eq 10) {
exp_points = 3;
var score = 110;
the_core.gotoAndStop(11);
mass = 130;
size = "big";
power = 3;
hp = _root.sciencevessel_hp;
} else if (unit_chosen eq 11) {
exp_points = 1;
var score = 40;
speed_k = 0.96;
the_core.gotoAndStop(12);
mass = 40;
size = "medium";
power = 2;
hp = _root.kindabike_hp;
} else if (unit_chosen eq 12) {
exp_points = 1;
var score = 50;
speed_k = 0.96;
the_core.gotoAndStop(13);
mass = 40;
size = "medium";
power = 2;
hp = _root.kindabike2_hp;
} else if (unit_chosen eq 14) {
exp_points = 7;
var score = 800;
speed_k = 0.89;
the_core.gotoAndStop(15);
mass = 750;
size = "hueg";
power = 5;
hp = _root.clinch_tank_hp;
} else if (unit_chosen eq 15) {
exp_points = 3;
var score = 130;
the_core.gotoAndStop(16);
mass = 120;
size = "big";
power = 3;
hp = _root.smooth_tank_hp;
}
}
if (birth eq "righty") {
xspeed_nominal = -1 * _root.enemy_speed;
} else {
xspeed_nominal = 1 * _root.enemy_speed;
}
if (dss != 1) {
temp_count = 0;
radius = _root["enemy_diameter_" + unit_chosen] / 2;
dss = 1;
damage = 0;
ydar = 0;
ydar_count = 0;
xspeed = xspeed_nominal;
yspeed = 0;
xpos = _x;
ypos = _y;
exist = 1;
}
}
if (hacked != 1) {
yspeed_nominal = 0;
if (birth eq "righty") {
xspeed_nominal = -1 * _root.enemy_speed;
} else {
xspeed_nominal = 1 * _root.enemy_speed;
}
} else {
xspeed_nominal = 0;
hacked_timer = hacked_timer + 0.0333333333333333;
if (hacked_timer > 5) {
hacked_timer = 0;
if (yspeed_nominal > 0) {
yspeed_nominal = -4;
} else {
yspeed_nominal = 4;
}
}
}
if (Math.abs(throw_yspeed) > 0.1) {
yspeed = throw_yspeed;
throw_yspeed = throw_yspeed * speed_k;
} else {
if (Math.abs(yspeed_nominal - yspeed) > 10) {
yd = 0.5;
} else if ((Math.abs(yspeed_nominal - yspeed) >= 5) and (Math.abs(yspeed_nominal - yspeed) < 10)) {
yd = 0.25;
} else if ((Math.abs(yspeed_nominal - yspeed) >= 3) and (Math.abs(yspeed_nominal - yspeed) < 5)) {
yd = 0.115;
} else if ((Math.abs(yspeed_nominal - yspeed) >= 1) and (Math.abs(yspeed_nominal - yspeed) < 3)) {
yd = 0.05;
} else if ((Math.abs(yspeed_nominal - yspeed) < 1) and (Math.abs(yspeed_nominal - yspeed) > 0)) {
yd = 0.01;
} else {
yd = 0;
}
if ((yspeed - yspeed_nominal) > 0) {
yspeed = yspeed - yd;
} else if ((yspeed - yspeed_nominal) < 0) {
yspeed = yspeed + yd;
}
}
if (Math.abs(throw_xspeed) > 0.1) {
xspeed = throw_xspeed;
throw_xspeed = throw_xspeed * speed_k;
} else {
if (Math.abs(xspeed_nominal - xspeed) > 10) {
xd = 0.5;
} else if ((Math.abs(xspeed_nominal - xspeed) >= 5) and (Math.abs(xspeed_nominal - xspeed) < 10)) {
xd = 0.25;
} else if ((Math.abs(xspeed_nominal - xspeed) >= 3) and (Math.abs(xspeed_nominal - xspeed) < 5)) {
xd = 0.115;
} else if ((Math.abs(xspeed_nominal - xspeed) >= 1) and (Math.abs(xspeed_nominal - xspeed) < 3)) {
xd = 0.05;
} else if ((Math.abs(xspeed_nominal - xspeed) < 1) and (Math.abs(xspeed_nominal - xspeed) > 0)) {
xd = 0.01;
} else {
xd = 0;
}
if ((xspeed - xspeed_nominal) > 0) {
xspeed = xspeed - xd;
} else if ((xspeed - xspeed_nominal) < 0) {
xspeed = xspeed + xd;
}
}
if (_name != "enemy") {
if (hhhhhhhhhhhhhhh != 1337) {
hhhhhhhhhhhhhhh = 1337;
rotationcount = 0;
zcount = 0;
}
rotationcount++;
if (rotationcount > 2) {
rotationcount = 0;
speedpovorota = 0.3;
var angle1 = (Math.atan2(dy, dx) * 57.2957795130823);
if (birth eq "righty") {
var dx = (-xspeed);
} else {
var dx = xspeed;
}
var dy = yspeed;
var angle2 = _rotation;
if (angle2 < 0) {
angle2 = angle2 + 360;
}
if (angle1 < 0) {
angle1 = angle1 + 360;
}
var a = (angle2 - angle1);
if (a > 180) {
a = a - 360;
} else if (a < -180) {
a = a + 360;
}
a = a * speedpovorota;
if (Math.abs(a) > 0.01) {
_rotation = (_rotation - a);
} else {
_rotation = angle1;
}
}
}
if (_name != "enemy") {
if (birth eq "righty") {
if (_x < -450) {
if (unit_chosen eq 4) {
_root.heavy_tank_count--;
}
_root.misses++;
removeMovieClip(this);
}
} else if (_x > 450) {
if (unit_chosen eq 4) {
_root.heavy_tank_count--;
}
_root.misses++;
removeMovieClip(this);
}
}
if (damage >= hp) {
stop();
death = 1;
}
if ((death eq 1) and (_name != "enemy")) {
_root.kills_count++;
_root.kills_exp_count = _root.kills_exp_count + exp_points;
_root.score = _root.score + score;
if (_root.explosions_count > 50) {
_root.explosions_count = 0;
} else {
_root.explosions_count++;
}
if (size eq "medium") {
duplicateMovieClip ("_root.game.explosions_medium", "explosion" + _root.explosions_count, _root.explosions_count + 10500);
} else if (size eq "small") {
duplicateMovieClip ("_root.game.explosions_small", "explosion" + _root.explosions_count, _root.explosions_count + 10500);
} else if (size eq "big") {
if ((unit_chosen eq 6) and (random(3) eq 2)) {
power = 4;
duplicateMovieClip ("_root.game.explosions_nuke", "explosion" + _root.explosions_count, _root.explosions_count + 10500);
} else {
duplicateMovieClip ("_root.game.explosions_big", "explosion" + _root.explosions_count, _root.explosions_count + 10500);
}
} else if (size eq "hueg") {
duplicateMovieClip ("_root.game.explosions_hueg", "explosion" + _root.explosions_count, _root.explosions_count + 10500);
}
_root.game["explosion" + _root.explosions_count].gotoAndPlay(random(3) + 1);
_root.game["explosion" + _root.explosions_count]._x = _x;
_root.game["explosion" + _root.explosions_count]._y = _y;
_root.game["explosion" + _root.explosions_count]._rotation = random(360);
var i = 0;
while (i < _root.dla_skolkih_unitov_funkcii) {
if (_root.game["enemy" + i]) {
_root.game.Explosion(["enemy" + i], _x, _y, power);
}
i++;
}
_root.game.ExplosionSound(power);
if (unit_chosen eq 3) {
true_respawn_rate = 2;
} else {
true_respawn_rate = _root.powerup_respawn_rate;
}
if (random(true_respawn_rate) eq 1) {
if (_root.powerups_count > 3) {
_root.powerups_count = 0;
} else {
_root.powerups_count++;
}
duplicateMovieClip ("_root.game.powerup_source", "powerup_" + _root.powerups_count, _root.powerups_count);
_root.game["powerup_" + _root.powerups_count]._x = _x;
_root.game["powerup_" + _root.powerups_count]._y = _y;
}
if (unit_chosen eq 4) {
_root.heavy_tank_count--;
}
removeMovieClip(this);
}
Symbol 114 MovieClip Frame 2
if (allset777 != "yiff") {
allset777 = "yiff";
the_core.videlenie._visible = false;
thisname = _name;
thiswidth = the_core._width;
thisheight = the_core._height;
thisdepth = this.getDepth();
the_core.skin_.birth = birth;
if (birth eq "righty") {
the_core.skin_.gotoAndStop(2);
} else {
the_core.skin_.gotoAndStop(1);
}
}
if (_y < _root.game.upper_wall._y) {
if (_x > 450) {
if (unit_chosen eq 4) {
_root.heavy_tank_count--;
}
removeMovieClip(this);
}
damage = 1000000 /* 0x0F4240 */;
_y = _root.game.upper_wall._y;
} else if (_y > _root.game.bottom_wall._y) {
if (_x > 450) {
if (unit_chosen eq 4) {
_root.heavy_tank_count--;
}
removeMovieClip(this);
}
damage = 1000000 /* 0x0F4240 */;
_y = _root.game.bottom_wall._y;
}
if (birth eq "righty") {
if (((_x > 600) or (removethisnow eq 1)) or (suckedintohole eq 1)) {
if (unit_chosen eq 4) {
_root.heavy_tank_count--;
}
removeMovieClip(this);
}
} else if (((_x < -600) or (removethisnow eq 1)) or (suckedintohole eq 1)) {
if (unit_chosen eq 4) {
_root.heavy_tank_count--;
}
removeMovieClip(this);
}
if (damage < 100000) {
if (startdragthis eq 1) {
the_core.health_bar._visible = false;
the_core.videlenie._visible = true;
if (size eq "small") {
_root.manipulator_timeout = _root.manipulator_loading_time / 2.2;
} else if (size eq "medium") {
_root.manipulator_timeout = _root.manipulator_loading_time / 1.9;
} else if (size eq "big") {
_root.manipulator_timeout = _root.manipulator_loading_time / 1.5;
if (_root.manipulator_lvl < 2) {
startdragthis = 0;
_root.call_error = 2;
_root.kursor = 1;
_root.manipulator_timeout = _root.manipulator_loading_time;
}
} else if (size eq "hueg") {
_root.manipulator_timeout = _root.manipulator_loading_time;
if (_root.manipulator_lvl < 3) {
startdragthis = 0;
_root.kursor = 1;
_root.call_error = 3;
}
}
being_thrown = 1;
being_thrown_timer = 0;
drag_x = _x;
drag_y = _y;
_x = _root.game._xmouse;
_y = _root.game._ymouse;
xpos = _x;
ypos = _y;
captured = 1;
swapDepths(50);
} else if (captured eq 1) {
the_core.videlenie._visible = false;
throwspeedmax = 20;
koefficient_broska = 0.8;
throw_xspeed = ((-drag_x) + _root.game._xmouse) * koefficient_broska;
throw_yspeed = ((-drag_y) + _root.game._ymouse) * koefficient_broska;
if (Math.abs(throw_xspeed) > throwspeedmax) {
voskilkobolshe_x = Math.abs(throw_xspeed) / throwspeedmax;
throw_xspeed = throw_xspeed * (1 / voskilkobolshe_x);
throw_yspeed = throw_yspeed * (1 / voskilkobolshe_x);
}
if (Math.abs(throw_yspeed) > throwspeedmax) {
voskilkobolshe_y = Math.abs(throw_yspeed) / throwspeedmax;
throw_yspeed = throw_yspeed * (1 / voskilkobolshe_y);
throw_xspeed = throw_xspeed * (1 / voskilkobolshe_y);
}
_name = thisname;
captured = 0;
swapDepths(thisdepth);
}
}
if ((being_thrown eq 1) and (captured eq 0)) {
being_thrown_timer++;
}
if (being_thrown_timer > 15) {
being_thrown_timer = 0;
being_thrown = 0;
}
gotoAndPlay (1);
if (ydar > 3) {
damage = 1000000 /* 0x0F4240 */;
}
ydar_count++;
if (ydar_count > 17) {
ydar_count = 0;
ydar = 0;
}
the_core.health_bar.hp = hp - damage;
the_core.health_bar.max = hp;
Symbol 128 MovieClip Frame 17
stop();
Symbol 133 MovieClip Frame 20
remove = 1;
Symbol 138 MovieClip Frame 20
remove = 1;
Symbol 159 MovieClip Frame 20
stop();
Symbol 164 MovieClip Frame 20
remove = 1;
Symbol 165 MovieClip Frame 1
stop();
Symbol 174 MovieClip Frame 17
stop();
Symbol 183 MovieClip Frame 18
remove = 1;
Symbol 184 MovieClip Frame 1
stop();
Symbol 213 MovieClip Frame 22
remove = 1;
Symbol 214 MovieClip Frame 1
stop();
Symbol 242 MovieClip Frame 29
remove = 1;
Symbol 243 MovieClip Frame 1
stop();
Symbol 278 MovieClip Frame 30
stop();
Symbol 284 MovieClip Frame 80
remove = 1;
Symbol 285 MovieClip Frame 1
stop();
Symbol 289 MovieClip Frame 26
stop();
Symbol 296 MovieClip Frame 1
if (this._name eq "gravity_shockwave") {
stop();
}
Symbol 296 MovieClip Frame 3
var i = 0;
while (i < _root.max_enemies) {
if (_root.game["enemy" + i]) {
_root.game.Explosion(["enemy" + i], _x, _y, 6);
}
i++;
}
Symbol 296 MovieClip Frame 39
removeMovieClip(this);
Symbol 296 MovieClip Frame 40
stop();
Symbol 379 MovieClip Frame 1
if (_name eq "teh_nuke") {
gotoAndStop (70);
}
Symbol 379 MovieClip Frame 2
gravity_nuke_in_action = 1;
Symbol 379 MovieClip Frame 42
gravity_nuke_in_action = 0;
Symbol 379 MovieClip Frame 48
removeMovieClip(this);
Symbol 379 MovieClip Frame 50
stop();
Symbol 379 MovieClip Frame 70
stop();
Symbol 407 MovieClip Frame 2
if (random(30) eq 1) {
play();
} else {
gotoAndPlay (1);
}
Symbol 437 MovieClip Frame 34
_root.blackhole_activated = 1;
Symbol 437 MovieClip Frame 185
_root.blackhole_activated = 0;
Symbol 437 MovieClip Frame 187
var i = 0;
while (i < _root.dla_skolkih_unitov_funkcii) {
if (_root.game["enemy" + i]) {
_root.game.Explosion("enemy" + i, _x, _y, 10);
}
i++;
}
Symbol 437 MovieClip Frame 211
removeMovieClip(this);
Symbol 446 MovieClip Frame 9
stop();
Symbol 454 MovieClip Frame 8
stop();
Symbol 458 MovieClip Frame 12
stop();
remove = 1;
stop();
Symbol 467 MovieClip Frame 5
stop();
Symbol 471 MovieClip Frame 4
stop();
Symbol 472 MovieClip Frame 12
stop();
remove = 1;
stop();
Symbol 481 MovieClip Frame 9
stop();
Symbol 482 MovieClip Frame 12
stop();
remove = 1;
stop();
Symbol 491 MovieClip Frame 9
stop();
Symbol 492 MovieClip Frame 12
stop();
remove = 1;
stop();
Symbol 501 MovieClip Frame 1
function ballSpeedAndDirection(ball) {
maxdistance = _root.game.maxdistance;
maxspeed = _root.game.maxspeed;
x_distance = Math.abs(_root.game[ball]._x - _root.game.center._x);
y_distance = Math.abs(_root.game[ball]._y - _root.game.center._y);
distance = Math.sqrt((x_distance * x_distance) + (y_distance * y_distance));
_root.game[ball].distance = distance;
if (x_distance > y_distance) {
abs_speed_modifier_x = 1;
abs_speed_modifier_y = y_distance / x_distance;
} else if (x_distance < y_distance) {
abs_speed_modifier_y = 1;
abs_speed_modifier_x = x_distance / y_distance;
} else {
abs_speed_modifier_y = 1;
abs_speed_modifier_x = 1;
}
napravlenie_x = _root.game[ball]._x - _root.game.center._x;
napravlenie_y = _root.game[ball]._y - _root.game.center._y;
if (napravlenie_x < 0) {
_root.game[ball].speed_modifier_x = 1 * abs_speed_modifier_x;
} else {
_root.game[ball].speed_modifier_x = -1 * abs_speed_modifier_x;
}
if (napravlenie_y < 0) {
_root.game[ball].speed_modifier_y = 1 * abs_speed_modifier_y;
} else {
_root.game[ball].speed_modifier_y = -1 * abs_speed_modifier_y;
}
if ((maxdistance / distance) >= 1.5) {
if (distance < maxdistance) {
_root.game[ball].speed = (distance / maxdistance) * maxspeed;
_root.speed = (distance / maxdistance) * maxspeed;
} else {
_root.game[ball].speed = maxspeed - 10;
_root.speed = maxspeed - 10;
}
} else if (distance < maxdistance) {
_root.game[ball].speed = (distance / maxdistance) * maxspeed;
_root.speed = (distance / maxdistance) * maxspeed;
} else {
_root.game[ball].speed = maxspeed;
_root.speed = maxspeed;
}
if ((maxdistance / distance) <= pokazatel_stabilnosty) {
_root.stability_rating = minimalnaya_stabilnost + ((((maxdistance / distance) - 1) / (pokazatel_stabilnosty - 1)) * 100);
if (_root.stability_rating > maximalnaya_stabilnost) {
_root.stability_rating = maximalnaya_stabilnost;
}
} else {
_root.stability_rating = maximalnaya_stabilnost;
}
_root.stability_rating = _root.stability_rating + _root.stability_skillbonus;
if (_root.stability_rating > 100) {
_root.stability_rating = 100;
}
if (_root.speed < 1.5) {
_root.stability_rating = 0;
}
}
function WallCollision(ball) {
if (_root.game[ball]) {
var _local2 = _root.game[ball];
var _local5 = _local2.ypos + _local2.yspeed;
var _local4 = _local2.radius;
if ((_local5 + _local4) > _root.game.bottom_wall._y) {
_local2.tempy = _root.game.bottom_wall._y - _local4;
_local2.yspeed = _local2.yspeed * -1;
doballcillisioneffect = 1;
}
if ((_local5 - _local4) < _root.game.upper_wall._y) {
_local2.tempy = _root.game.upper_wall._y + _local4;
_local2.yspeed = _local2.yspeed * -1;
doballcillisioneffect = 1;
}
if (doballcillisioneffect eq 1) {
doballcillisioneffect = 0;
_root.game[ball].udar++;
_root.game[ball].hits++;
if (_root.game[ball].type_ eq 3) {
_root.game[ball].yspeed = _root.game[ball].yspeed * 1.1;
_root.game[ball].xspeed = _root.game[ball].xspeed * 1.1;
}
_root.game[ball].ball_animation.vspishka.play();
if (random(2) eq 1) {
_root.ball_bounce_1.start();
} else {
_root.ball_bounce_2.start();
}
}
}
}
function Enemy2WallCollision(enemy) {
if (_root.game[enemy]) {
var _local2 = _root.game[enemy];
var _local4 = _local2.ypos + _local2.yspeed;
var _local3 = _local2.radius;
if ((_local4 + _local3) > _root.game.bottom_wall._y) {
_local2.tempy = _root.game.bottom_wall._y - _local3;
doenemycillisioneffect = 1;
}
if ((_local4 - _local3) < _root.game.upper_wall._y) {
_local2.tempy = _root.game.upper_wall._y + _local3;
doenemycillisioneffect = 1;
}
if (doenemycillisioneffect eq 1) {
doenemycillisioneffect = 0;
if (Math.abs(_local2.yspeed) > 5) {
_local2.yspeed = _local2.yspeed * -0.5;
_local2.throw_yspeed = _local2.throw_yspeed * -1;
} else {
_local2.throw_yspeed = _local2.throw_yspeed * -1;
_local2.yspeed = _local2.yspeed * -0.8;
}
wallImpactSound();
_local2.damage = _local2.damage + Math.abs(_local2.yspeed * _local2.mass);
_local2.ydar = _local2.ydar + 1;
if (framesleft1 <= 1) {
collisionEffect(_local2._x, _local2._y + 4, "upper");
} else {
collisionEffect(_local2._x, _local2._y - 4, "bottom");
}
}
}
}
function StolknovenieVragaIsharika(ball, enemy, x1, x2, y1, y2, time) {
var _local6 = _root.game[ball].mass;
var _local8 = _root.game[enemy].mass;
var _local17 = _root.game[ball].xspeed;
var _local16 = _root.game[enemy].xspeed;
var _local20 = _root.game[ball].yspeed;
var _local18 = _root.game[enemy].yspeed;
cryticalpoint = 35;
if ((_local17 > cryticalpoint) or (_local20 > cryticalpoint)) {
kritikalspeed = 1;
} else {
kritikalspeed = 0;
}
var _local21 = x1 - x2;
var _local23 = y1 - y2;
if (_root.game[ball].type_ eq 7) {
var _local12 = random(360);
} else {
var _local12 = Math.atan2(_local23, _local21);
}
var _local5 = Math.cos(_local12);
var _local4 = Math.sin(_local12);
if (((_root.game[enemy].unit_chosen eq 16) or (_root.game[enemy].unit_chosen eq 18)) and (kritikalspeed != 1)) {
_root.game[enemy].damage = _root.game[enemy].damage * 0.333333333333333;
} else {
if (_root.game[enemy].hp <= _root.game[ball].damage) {
nocollisionduetoenemydeath = 1;
} else {
nocollisionduetoenemydeath = 0;
}
_root.game[enemy].damage = _root.game[enemy].damage + _root.game[ball].damage;
if (_root.game[ball].type_ != 9) {
_root.game[ball].hits++;
_root.game[ball].udar2++;
_root.game[ball].ball_animation.vspishka.play();
if (random(2) eq 1) {
_root.balltoenemy_impact2.start();
} else {
_root.balltoenemy_impact1.start();
}
}
}
var _local13 = (_local17 * _local5) + (_local20 * _local4);
var _local10 = (_local16 * _local5) + (_local18 * _local4);
var _local11 = (_local20 * _local5) - (_local17 * _local4);
var _local9 = (_local18 * _local5) - (_local16 * _local4);
var _local19 = (_local6 * _local13) + (_local8 * _local10);
var _local22 = _local13 - _local10;
var _local14 = (_local19 + (_local6 * _local22)) / (_local6 + _local8);
if (((_root.game[ball].type_ eq 1) or (_root.game[ball].type_ eq 8)) or (_root.game[ball].type_ eq 3)) {
var _local15 = (_local14 - _local13) + _local10;
} else {
var _local15 = (-_local13) + _local10;
}
_local13 = _local15;
_local10 = _local14;
_local17 = (_local13 * _local5) - (_local11 * _local4);
_local16 = (_local10 * _local5) - (_local9 * _local4);
_local20 = (_local11 * _local5) + (_local13 * _local4);
_local18 = (_local9 * _local5) + (_local10 * _local4);
if (_root.game[ball].type_ eq 10) {
removeMovieClip(_root.game[ball]);
if (_root.explosions_count > 50) {
_root.explosions_count = 0;
} else {
_root.explosions_count++;
}
duplicateMovieClip ("_root.game.teh_nuke", "zomg_nuke_" + _root.explosions_count, _root.explosions_count + 10500);
_root.game["zomg_nuke_" + _root.explosions_count]._x = _root.game[enemy]._x;
_root.game["zomg_nuke_" + _root.explosions_count]._y = _root.game[enemy]._y;
}
if (((_root.game[enemy].unit_chosen eq 16) or (_root.game[enemy].unit_chosen eq 18)) and (kritikalspeed != 1)) {
removeMovieClip(_root.game[ball]);
_root.game[enemy].the_core.absorb.play();
} else if (_root.game[ball].type_ eq 9) {
} else {
_root.game[enemy].the_core.ballhitanim.play();
if (_root.game[enemy].hp > _root.game[ball].damage) {
if ((_root.game[ball].type_ eq 5) and (_root.game[ball].glued != 1)) {
_root.game[ball].glued = 1;
_root.game[ball].type_ = 6;
_root.game[ball].tempx = _root.game[enemy].tempx;
_root.game[ball].tempy = _root.game[enemy].tempy;
_root.game[ball].xspeed = 5;
_root.game[ball].yspeed = random(5);
} else {
if ((_root.game[ball].type_ != 5) and (_root.game[ball].type_ != 6)) {
time_modifier = 0.95;
} else if (_root.game[ball].type_ eq 6) {
time_modifier = 0.8;
}
_root.game[enemy].tempx = _root.game[enemy].xpos + ((_root.game[enemy].xspeed * time) * time_modifier);
_root.game[enemy].tempy = _root.game[enemy].ypos + ((_root.game[enemy].yspeed * time) * time_modifier);
_root.game[ball].tempx = _root.game[ball].xpos + ((_root.game[ball].xspeed * time) * time_modifier);
_root.game[ball].tempy = _root.game[ball].ypos + ((_root.game[ball].yspeed * time) * time_modifier);
_root.game[ball].xspeed = _local17;
_root.game[ball].yspeed = _local20;
}
_root.game[enemy].xspeed = _local16;
_root.game[enemy].yspeed = _local18;
if (_root.game[ball].type_ eq 3) {
_root.game[ball].yspeed = _root.game[ball].yspeed * 1.1;
_root.game[ball].xspeed = _root.game[ball].xspeed * 1.1;
}
}
}
}
function ballToEnemyCollisionDetectionAndReaction(ball, enemy) {
var _local9 = _root.game[ball].xspeed;
var _local7 = _root.game[ball].yspeed;
var _local8 = _root.game[enemy].xspeed;
var _local6 = _root.game[enemy].yspeed;
var _local5 = _root.game[ball]._x;
var _local3 = _root.game[ball]._y;
var _local4 = _root.game[enemy]._x;
var _local2 = _root.game[enemy]._y;
var _local16 = _root.game[ball].radius + _root.game[enemy].radius;
var _local22 = (((-2 * _local9) * _local8) + (_local9 * _local9)) + (_local8 * _local8);
var _local21 = ((((-2 * _local5) * _local8) - ((2 * _local4) * _local9)) + ((2 * _local5) * _local9)) + ((2 * _local4) * _local8);
var _local20 = (((-2 * _local5) * _local4) + (_local5 * _local5)) + (_local4 * _local4);
var _local19 = (((-2 * _local7) * _local6) + (_local7 * _local7)) + (_local6 * _local6);
var _local18 = ((((-2 * _local3) * _local6) - ((2 * _local2) * _local7)) + ((2 * _local3) * _local7)) + ((2 * _local2) * _local6);
var _local26 = (((-2 * _local3) * _local2) + (_local3 * _local3)) + (_local2 * _local2);
var _local15 = _local22 + _local19;
var _local12 = _local21 + _local18;
var _local25 = (_local20 + _local26) - (_local16 * _local16);
var _local17 = Math.sqrt((_local12 * _local12) - ((4 * _local15) * _local25));
var _local14 = ((-_local12) + _local17) / (2 * _local15);
var _local13 = ((-_local12) - _local17) / (2 * _local15);
if ((_local14 > 0) && (_local14 <= 1)) {
var _local23 = _local14;
var _local24 = true;
}
if ((_local13 > 0) && (_local13 <= 1)) {
if ((_local23 == null) || (_local13 < _local14)) {
var _local23 = _local13;
var _local24 = true;
}
}
if (_local24) {
StolknovenieVragaIsharika(ball, enemy, _local5, _local4, _local3, _local2, _local23);
}
}
function StolknovenieVragov(enemy_1, enemy_2, x1, x2, y1, y2, time) {
var _local4 = _root.game[enemy_1].mass;
var _local5 = _root.game[enemy_2].mass;
var _local20 = _root.game[enemy_1].xspeed;
var _local19 = _root.game[enemy_2].xspeed;
var _local23 = _root.game[enemy_1].yspeed;
var _local21 = _root.game[enemy_2].yspeed;
if ((((Math.abs(_local23) < 1.5) and (Math.abs(_local21) < 1.5)) and (Math.abs(_local20) < 1.5)) and (Math.abs(_local19) < 1.5)) {
skorost_nominalnaya = 1;
} else {
skorost_nominalnaya = 0;
}
var _local24 = x1 - x2;
var _local28 = y1 - y2;
var _local13 = Math.atan2(_local28, _local24);
var _local7 = Math.cos(_local13);
var _local6 = Math.sin(_local13);
var _local14 = (_local20 * _local7) + (_local23 * _local6);
var _local11 = (_local19 * _local7) + (_local21 * _local6);
var _local12 = (_local23 * _local7) - (_local20 * _local6);
var _local10 = (_local21 * _local7) - (_local19 * _local6);
_root.game[enemy_1].damage = _root.game[enemy_1].damage + ((Math.abs(_local14) + Math.abs(_local11)) * _local5);
_root.game[enemy_2].damage = _root.game[enemy_2].damage + ((Math.abs(_local14) + Math.abs(_local11)) * _local4);
enemy2enemyImpactSound();
var _local26 = x1 - x2;
var _local25 = y1 - y2;
R2 = _root.game[enemy_2].radius;
var _local15 = ((-Math.atan2(_local26, _local25)) / (Math.PI/180)) + 270;
collision_y3 = y2 - (R2 * Math.sin(_local15 * (Math.PI/180)));
collision_x3 = x2 - (R2 * Math.cos(_local15 * (Math.PI/180)));
collisionEffect(collision_x3, collision_y3);
var _local22 = (_local4 * _local14) + (_local5 * _local11);
var _local27 = _local14 - _local11;
var _local8 = (_local22 + (_local4 * _local27)) / (_local4 + _local5);
if (_root.game[enemy_1].birth != _root.game[enemy_2].birth) {
if (((_local4 / _local5) > 4) or ((_local4 / _local5) < 0.25)) {
} else {
_local8 = 0;
}
if (skorost_nominalnaya eq 1) {
if (random(2) eq 1) {
if ((_local4 / _local5) < 1) {
_local23 = -2;
}
if ((_local5 / _local4) < 1) {
_local21 = 2;
}
} else {
if ((_local4 / _local5) < 1) {
_local23 = 2;
}
if ((_local5 / _local4) < 1) {
_local21 = -2;
}
}
}
}
var _local18 = (_local8 - _local14) + _local11;
_local14 = _local18;
_local11 = _local8;
_local20 = (_local14 * _local7) - (_local12 * _local6);
_local19 = (_local11 * _local7) - (_local10 * _local6);
_local23 = (_local12 * _local7) + (_local14 * _local6);
_local21 = (_local10 * _local7) + (_local11 * _local6);
_root.game[enemy_1].tempx = _root.game[enemy_1].xpos + ((_root.game[enemy_1].xspeed * time) * 0.95);
_root.game[enemy_1].tempy = _root.game[enemy_1].ypos + ((_root.game[enemy_1].yspeed * time) * 0.95);
_root.game[enemy_2].tempx = _root.game[enemy_2].xpos + ((_root.game[enemy_2].xspeed * time) * 0.95);
_root.game[enemy_2].tempy = _root.game[enemy_2].ypos + ((_root.game[enemy_2].yspeed * time) * 0.95);
_root.game[enemy_1].xspeed = _local20;
_root.game[enemy_2].xspeed = _local19;
_root.game[enemy_1].yspeed = _local23;
_root.game[enemy_2].yspeed = _local21;
}
function EnemyToEnemyCollisionDetectionAndReaction(enemy_1, enemy_2) {
var _local9 = _root.game[enemy_1].xspeed;
var _local7 = _root.game[enemy_1].yspeed;
var _local8 = _root.game[enemy_2].xspeed;
var _local6 = _root.game[enemy_2].yspeed;
var _local5 = _root.game[enemy_1]._x;
var _local3 = _root.game[enemy_1]._y;
var _local4 = _root.game[enemy_2]._x;
var _local2 = _root.game[enemy_2]._y;
var _local16 = _root.game[enemy_1].radius + _root.game[enemy_2].radius;
var _local22 = (((-2 * _local9) * _local8) + (_local9 * _local9)) + (_local8 * _local8);
var _local21 = ((((-2 * _local5) * _local8) - ((2 * _local4) * _local9)) + ((2 * _local5) * _local9)) + ((2 * _local4) * _local8);
var _local20 = (((-2 * _local5) * _local4) + (_local5 * _local5)) + (_local4 * _local4);
var _local19 = (((-2 * _local7) * _local6) + (_local7 * _local7)) + (_local6 * _local6);
var _local18 = ((((-2 * _local3) * _local6) - ((2 * _local2) * _local7)) + ((2 * _local3) * _local7)) + ((2 * _local2) * _local6);
var _local26 = (((-2 * _local3) * _local2) + (_local3 * _local3)) + (_local2 * _local2);
var _local15 = _local22 + _local19;
var _local10 = _local21 + _local18;
var _local25 = (_local20 + _local26) - (_local16 * _local16);
var _local17 = Math.sqrt((_local10 * _local10) - ((4 * _local15) * _local25));
var _local13 = ((-_local10) + _local17) / (2 * _local15);
var _local11 = ((-_local10) - _local17) / (2 * _local15);
if ((_local13 > 0) && (_local13 <= 1)) {
var _local23 = _local13;
var _local24 = true;
}
if ((_local11 > 0) && (_local11 <= 1)) {
if ((_local23 == null) || (_local11 < _local13)) {
var _local23 = _local11;
var _local24 = true;
}
}
if (_local24 eq "true") {
StolknovenieVragov(enemy_1, enemy_2, _local5, _local4, _local3, _local2, _local23);
}
}
function Implosion(enemy) {
implosion_radius = 250;
x1 = _root.game[enemy]._x;
y1 = _root.game[enemy]._y;
x2 = _root.game.implosion1._x;
y2 = _root.game.implosion1._y;
var _local5 = x1 - x2;
var _local7 = y1 - y2;
var _local8 = Math.sqrt((_local5 * _local5) + (_local7 * _local7));
if (_local8 < implosion_radius) {
implosion_mass = 50;
implosion_suckingpower = (-15 * _local8) / implosion_radius;
var _local6 = _root.game[enemy].mass;
var _local9 = implosion_mass;
var _local17 = _root.game[enemy].xspeed;
var _local19 = _root.game[enemy].yspeed;
var _local13 = Math.atan2(_local7, _local5);
var _local3 = Math.cos(_local13);
var _local2 = Math.sin(_local13);
var _local14 = (_local17 * _local3) + (_local19 * _local2);
var _local11 = implosion_suckingpower;
var _local12 = (_local19 * _local3) - (_local17 * _local2);
var _local10 = 0.0001;
var _local18 = (_local6 * _local14) + (_local9 * _local11);
var _local20 = _local14 - _local11;
var _local15 = (_local18 + (_local6 * _local20)) / (_local6 + _local9);
var _local16 = (_local15 - _local14) + _local11;
_local14 = _local16;
_local11 = _local15;
_local17 = (_local14 * _local3) - (_local12 * _local2);
var _local21 = (_local11 * _local3) - (_local10 * _local2);
_local19 = (_local12 * _local3) + (_local14 * _local2);
var _local22 = (_local10 * _local3) + (_local11 * _local2);
_root.game[enemy].xspeed = _local17;
_root.game[enemy].yspeed = _local19;
}
}
function GravityNuke(enemy, gravnuke_x, gravnuke_y, gravnuke_radius_small, gravnuke_radius_big) {
x1 = _root.game[enemy]._x;
y1 = _root.game[enemy]._y;
x2 = gravnuke_x;
y2 = gravnuke_y;
var _local5 = x1 - x2;
var _local7 = y1 - y2;
var _local8 = Math.sqrt((_local5 * _local5) + (_local7 * _local7));
rdb_dx = _root.game.center._x - x2;
rdb_dy = _root.game.center._y - y2;
rasstoyanie_do_bazi = Math.sqrt((rdb_dx * rdb_dx) + (rdb_dy * rdb_dy)) - 40;
if (rasstoyanie_do_bazi < 0) {
rasstoyanie_do_bazi = 0;
}
if (rasstoyanie_do_bazi < gravnuke_radius_small) {
_root.structure = _root.structure - (_root.gravity_nuke_hueg_dmg * koef_oslableniya_dmg_po_baze);
} else if (rasstoyanie_do_bazi < gravnuke_radius_big) {
_root.structure = _root.structure - (_root.gravity_nuke_radius_dmg * koef_oslableniya_dmg_po_baze);
}
if (_local8 < gravnuke_radius_small) {
_root.game[enemy].damage = _root.game[enemy].damage + _root.gravity_nuke_hueg_dmg;
} else if (_local8 < gravnuke_radius_big) {
_root.game[enemy].damage = _root.game[enemy].damage + _root.gravity_nuke_radius_dmg;
implosion_mass = 20;
Gravnuke_power = 25;
implosion_suckingpower = (-1.3 * Gravnuke_power) + random(Gravnuke_power * 2);
var _local6 = _root.game[enemy].mass;
var _local9 = implosion_mass;
var _local17 = _root.game[enemy].xspeed;
var _local19 = _root.game[enemy].yspeed;
var _local13 = Math.atan2(_local7, _local5);
var _local4 = Math.cos(_local13);
var _local3 = Math.sin(_local13);
var _local14 = (_local17 * _local4) + (_local19 * _local3);
var _local11 = implosion_suckingpower;
var _local12 = (_local19 * _local4) - (_local17 * _local3);
var _local10 = 0.0001;
var _local18 = (_local6 * _local14) + (_local9 * _local11);
var _local20 = _local14 - _local11;
var _local15 = (_local18 + (_local6 * _local20)) / (_local6 + _local9);
var _local16 = (_local15 - _local14) + _local11;
_local14 = _local16;
_local11 = _local15;
_local17 = (_local14 * _local4) - (_local12 * _local3);
var _local21 = (_local11 * _local4) - (_local10 * _local3);
_local19 = (_local12 * _local4) + (_local14 * _local3);
var _local22 = (_local10 * _local4) + (_local11 * _local3);
_root.game[enemy].xspeed = _local17;
_root.game[enemy].yspeed = _local19;
}
}
function Explosion(enemy, explosion_x, explosion_y, power) {
if (power eq 1) {
explosion_radius = 35;
explosion_mass = 10;
explosion_power = 8;
_root.shakescreen = 5;
explosion_dmg = random(300);
} else if (power eq 2) {
explosion_radius = 55;
_root.shakescreen = 7;
explosion_mass = 20;
explosion_power = 12;
explosion_dmg = random(400);
} else if (power eq 3) {
explosion_radius = 75;
_root.shakescreen = 15;
explosion_mass = 25;
explosion_power = 25;
explosion_dmg = random(700);
} else if (power eq 5) {
_root.shakescreen = 20;
explosion_radius = 130;
explosion_mass = 35;
explosion_power = 35;
explosion_dmg = 500 + random(1000);
} else if (power eq 4) {
explosion_radius = 170;
_root.shakescreen = 30;
explosion_mass = 50;
explosion_power = 40;
explosion_dmg = 4000 + random(2500);
} else if (power eq 6) {
explosion_radius = 70;
_root.shakescreen = 15;
explosion_mass = 100;
explosion_power = 50;
explosion_dmg = 1;
} else if (power eq 7) {
explosion_radius = 30;
_root.shakescreen = 15;
explosion_mass = 50;
explosion_power = 10;
explosion_dmg = 500 + random(1000);
} else if (power eq 8) {
explosion_radius = 40;
_root.shakescreen = 10;
explosion_mass = 100;
explosion_power = 40;
explosion_dmg = 1;
} else if (power eq 9) {
explosion_radius = 135;
_root.shakescreen = 10;
explosion_mass = 100;
explosion_power = 20;
explosion_dmg = 1000;
} else if (power eq 10) {
explosion_radius = 150;
_root.shakescreen = 5;
explosion_mass = 100;
explosion_power = 80;
explosion_dmg = 1;
} else if (power eq 11) {
explosion_radius = 80;
_root.shakescreen = 5;
explosion_mass = 35;
explosion_power = 35;
explosion_dmg = 1500;
} else if (power eq 12) {
explosion_radius = 100;
_root.shakescreen = 5;
explosion_mass = 50;
explosion_power = -40;
explosion_dmg = 1;
} else if (power eq 13) {
explosion_radius = 80;
_root.shakescreen = 5;
explosion_mass = 100;
explosion_power = 80;
explosion_dmg = 1;
} else if (power eq 14) {
explosion_radius = 75;
explosion_mass = 20;
explosion_power = -40;
explosion_dmg = 1;
}
x1 = _root.game[enemy]._x;
y1 = _root.game[enemy]._y;
x2 = explosion_x;
y2 = explosion_y;
var _local7 = x1 - x2;
var _local8 = y1 - y2;
var _local21 = Math.sqrt((_local7 * _local7) + (_local8 * _local8));
damage_po_baze = explosion_dmg / _root.enemies_onthefield;
var _local2 = 0;
while (_local2 < 6) {
if (_root.game["shockwave_tower_" + _local2]) {
shocktower_dx = _root.game["shockwave_tower_" + _local2]._x - x2;
shocktower_dy = _root.game["shockwave_tower_" + _local2]._y - y2;
shocktower_dist = Math.sqrt((shocktower_dx * shocktower_dx) + (shocktower_dy * shocktower_dy)) - 25;
if (shocktower_dist < explosion_radius) {
damage_po_baze = damage_po_baze / 10;
_root.game["shockwave_tower_" + _local2].health = _root.game["shockwave_tower_" + _local2].health - damage_po_baze;
}
}
_local2++;
}
_local2 = 0;
while (_local2 < 6) {
if (_root.game["tremor_tower_" + _local2]) {
tremortower_dx = _root.game["tremorwave_tower_" + _local2]._x - x2;
tremortower_dy = _root.game["tremorwave_tower_" + _local2]._y - y2;
tremortower_dist = Math.sqrt((tremortower_dx * tremortower_dx) + (tremortower_dy * tremortower_dy)) - 25;
if (tremortower_dist < explosion_radius) {
damage_po_baze = damage_po_baze / 10;
_root.game["tremorwave_tower_" + _local2].health = _root.game["tremorwave_tower_" + _local2].health - damage_po_baze;
}
}
_local2++;
}
rdb_dx = _root.game.center._x - x2;
rdb_dy = _root.game.center._y - y2;
rasstoyanie_do_bazi = Math.sqrt((rdb_dx * rdb_dx) + (rdb_dy * rdb_dy)) - 40;
if (rasstoyanie_do_bazi < 0) {
rasstoyanie_do_bazi = 0;
}
if (rasstoyanie_do_bazi < explosion_radius) {
_root.structure = _root.structure - damage_po_baze;
}
if (((_local21 - _root.game[enemy].radius) < explosion_radius) and ((Math.abs(_local7) + Math.abs(_local8)) > 0.0001)) {
_root.game[enemy].damage = _root.game[enemy].damage + explosion_dmg;
var _local9 = _root.game[enemy].mass;
var _local10 = explosion_mass;
var _local18 = _root.game[enemy].xspeed;
var _local20 = _root.game[enemy].yspeed;
var _local14 = Math.atan2(_local8, _local7);
var _local6 = Math.cos(_local14);
var _local5 = Math.sin(_local14);
var _local15 = (_local18 * _local6) + (_local20 * _local5);
var _local12 = explosion_power;
var _local13 = (_local20 * _local6) - (_local18 * _local5);
var _local11 = 0.0001;
var _local19 = (_local9 * _local15) + (_local10 * _local12);
var _local22 = _local15 - _local12;
var _local16 = (_local19 + (_local9 * _local22)) / (_local9 + _local10);
var _local17 = (_local16 - _local15) + _local12;
_local15 = _local17;
_local12 = _local16;
_local18 = (_local15 * _local6) - (_local13 * _local5);
var _local23 = (_local12 * _local6) - (_local11 * _local5);
_local20 = (_local13 * _local6) + (_local15 * _local5);
var _local24 = (_local11 * _local6) + (_local12 * _local5);
_root.game[enemy].xspeed = _local18;
_root.game[enemy].yspeed = _local20;
}
}
function ZashitaOtRespaNaOdnomMeste(enemy_1, enemy_2) {
if ((_root.game[enemy_1]._x < -410) or (_root.game[enemy_2]._x < -410)) {
if ((_root.game[enemy_1].birth eq "lefty") and (_root.game[enemy_2].birth eq "lefty")) {
x_dist = Math.abs(_root.game[enemy_1]._x - _root.game[enemy_2]._x);
y_dist = Math.abs(_root.game[enemy_1]._y - _root.game[enemy_2]._y);
diste = Math.sqrt((x_dist * x_dist) + (y_dist * y_dist));
Rr = _root.game[enemy_1].radius + _root.game[enemy_2].radius;
if ((diste < Rr) and (_root.game[enemy_2].removprotect != 1)) {
if (_root.game[enemy_1]._x < -410) {
_root.game[enemy_1].removethisnow = 1;
_root.game[enemy_2].removprotect = 1;
}
}
}
} else if ((_root.game[enemy_1]._x > 410) or (_root.game[enemy_2]._x > 410)) {
if ((_root.game[enemy_1].birth eq "righty") and (_root.game[enemy_2].birth eq "righty")) {
x_dist = Math.abs(_root.game[enemy_1]._x - _root.game[enemy_2]._x);
y_dist = Math.abs(_root.game[enemy_1]._y - _root.game[enemy_2]._y);
diste = Math.sqrt((x_dist * x_dist) + (y_dist * y_dist));
Rr = _root.game[enemy_1].radius + _root.game[enemy_2].radius;
if ((diste < Rr) and (_root.game[enemy_2].removprotect != 1)) {
if (_root.game[enemy_1]._x > 410) {
_root.game[enemy_1].removethisnow = 1;
_root.game[enemy_2].removprotect = 1;
}
}
}
}
}
function ZashitaOtSkleivaniya(enemy_1, enemy_2) {
x_dist2 = Math.abs(_root.game[enemy_1]._x - _root.game[enemy_2]._x);
y_dist2 = Math.abs(_root.game[enemy_1]._y - _root.game[enemy_2]._y);
diste2 = Math.sqrt((x_dist2 * x_dist2) + (y_dist2 * y_dist2));
Rr2 = _root.game[enemy_1].radius + _root.game[enemy_2].radius;
if (_root.game[enemy_1].birth eq _root.game[enemy_2].birth) {
if (((diste2 < Rr2) and (_root.game[enemy_1].captured != 1)) and (_root.game[enemy_2].captured != 1)) {
if ((_root.game[enemy_1].being_thrown eq 1) or (_root.game[enemy_2].being_thrown eq 1)) {
if (_root.game[enemy_1].radius > _root.game[enemy_2].radius) {
_root.game[enemy_2].damage = _root.game[enemy_2].damage + 2000000;
} else if (_root.game[enemy_2].radius > _root.game[enemy_1].radius) {
_root.game[enemy_1].damage = _root.game[enemy_1].damage + 2000000;
} else if (_root.game[enemy_2].radius eq _root.game[enemy_1].radius) {
_root.game[enemy_1].damage = _root.game[enemy_1].damage + 2000000;
_root.game[enemy_2].damage = _root.game[enemy_2].damage + 2000000;
}
} else {
collision_damage_defined = 0.142857142857143;
if (_root.game[enemy_1].radius > _root.game[enemy_2].radius) {
_root.game[enemy_2].damage = _root.game[enemy_2].damage + (_root.game[enemy_2].hp * collision_damage_defined);
} else if (_root.game[enemy_2].radius > _root.game[enemy_1].radius) {
_root.game[enemy_1].damage = _root.game[enemy_1].damage + (_root.game[enemy_1].hp * collision_damage_defined);
} else if (_root.game[enemy_2].radius eq _root.game[enemy_1].radius) {
_root.game[enemy_1].damage = _root.game[enemy_1].damage + (_root.game[enemy_1].hp * collision_damage_defined);
_root.game[enemy_2].damage = _root.game[enemy_2].damage + (_root.game[enemy_2].hp * collision_damage_defined);
}
}
}
} else if (((diste2 < Rr2) and (_root.game[enemy_1].captured != 1)) and (_root.game[enemy_2].captured != 1)) {
if ((_root.game[enemy_1].being_thrown eq 1) or (_root.game[enemy_2].being_thrown eq 1)) {
if (_root.game[enemy_1].radius > _root.game[enemy_2].radius) {
_root.game[enemy_2].damage = _root.game[enemy_2].damage + 2000000;
} else if (_root.game[enemy_2].radius > _root.game[enemy_1].radius) {
_root.game[enemy_1].damage = _root.game[enemy_1].damage + 2000000;
} else if (_root.game[enemy_2].radius eq _root.game[enemy_1].radius) {
_root.game[enemy_1].damage = _root.game[enemy_1].damage + 2000000;
_root.game[enemy_2].damage = _root.game[enemy_2].damage + 2000000;
}
} else {
collision_damage_defined = 200;
if (_root.game[enemy_1].radius > _root.game[enemy_2].radius) {
_root.game[enemy_2].damage = _root.game[enemy_2].damage + (_root.game[enemy_2].hp * collision_damage_defined);
} else if (_root.game[enemy_2].radius > _root.game[enemy_1].radius) {
_root.game[enemy_1].damage = _root.game[enemy_1].damage + (_root.game[enemy_1].hp * collision_damage_defined);
} else if (_root.game[enemy_2].radius eq _root.game[enemy_1].radius) {
_root.game[enemy_1].damage = _root.game[enemy_1].damage + (_root.game[enemy_1].hp * collision_damage_defined);
_root.game[enemy_2].damage = _root.game[enemy_2].damage + (_root.game[enemy_2].hp * collision_damage_defined);
}
}
}
}
function shleifOtSharika(ball) {
if (_root.shleifcount > 100) {
_root.shleifcount = 0;
} else {
_root.shleifcount++;
}
if (_root.game[ball].type_ eq 1) {
duplicateMovieClip (_root.game.shleif_blue, "shleif" + _root.shleifcount, _root.shleifcount + 5000);
} else if (_root.game[ball].type_ eq 2) {
duplicateMovieClip (_root.game.shleif_purple, "shleif" + _root.shleifcount, _root.shleifcount + 5000);
} else if (_root.game[ball].type_ eq 3) {
duplicateMovieClip (_root.game.shleif_green, "shleif" + _root.shleifcount, _root.shleifcount + 5000);
} else if (_root.game[ball].type_ eq 4) {
duplicateMovieClip (_root.game.shleif_red, "shleif" + _root.shleifcount, _root.shleifcount + 5000);
} else if (_root.game[ball].type_ eq 5) {
duplicateMovieClip (_root.game.shleif_gold, "shleif" + _root.shleifcount, _root.shleifcount + 5000);
} else if (_root.game[ball].type_ eq 6) {
duplicateMovieClip (_root.game.shleif_white, "shleif" + _root.shleifcount, _root.shleifcount + 5000);
} else if (_root.game[ball].type_ eq 7) {
duplicateMovieClip (_root.game.shleif_white, "shleif" + _root.shleifcount, _root.shleifcount + 5000);
} else if (_root.game[ball].type_ eq 8) {
duplicateMovieClip (_root.game.shleif_red, "shleif" + _root.shleifcount, _root.shleifcount + 5000);
} else if (_root.game[ball].type_ eq 9) {
duplicateMovieClip (_root.game.shleif_black, "shleif" + _root.shleifcount, _root.shleifcount + 5000);
} else if (_root.game[ball].type_ eq 10) {
duplicateMovieClip (_root.game.shleif_red, "shleif" + _root.shleifcount, _root.shleifcount + 5000);
}
_root.game["shleif" + _root.shleifcount]._x = _root.game[ball]._x;
_root.game["shleif" + _root.shleifcount]._y = _root.game[ball]._y;
_root.game["shleif" + _root.shleifcount].gotoAndPlay(2);
}
function collisionEffect(collision_x, collision_y, mod) {
if (collision_count < 100) {
collision_count++;
} else {
collision_count = 0;
}
duplicateMovieClip (_root.game.udar, "udar_anim" + collision_count, 20000 + collision_count);
_root.game["udar_anim" + collision_count]._x = collision_x;
_root.game["udar_anim" + collision_count]._y = collision_y;
_root.game["udar_anim" + collision_count]._rotation = random(360);
_root.game["udar_anim" + collision_count].gotoAndStop(random(4) + 1);
if (mod eq "upper") {
_root.game["udar_anim" + collision_count].anim.bottom_._visible = false;
} else if (mod eq "bottom") {
_root.game["udar_anim" + collision_count].anim.upper_._visible = false;
} else {
_root.game["udar_anim" + collision_count].anim.bottom_._visible = false;
_root.game["udar_anim" + collision_count].anim.upper_._visible = false;
}
}
function wallImpactSound() {
_root.collisionenemy2wallrandomizer = random(4);
if (_root.collisionenemy2wallrandomizer eq 3) {
_root.impact_enemy2wall_4.start();
} else if (_root.collisionenemy2wallrandomizer eq 2) {
_root.impact_enemy2wall_3.start();
} else if (_root.collisionenemy2wallrandomizer eq 1) {
_root.impact_enemy2wall_2.start();
} else if (_root.collisionenemy2wallrandomizer eq 0) {
_root.impact_enemy2wall_1.start();
}
}
function enemy2enemyImpactSound() {
_root["impact_enemy2enemy_" + (random(10) + 1)].start();
}
function ExplosionSound(power) {
if ((power eq 1) or (power eq 2)) {
_root["Explosion_" + (random(4) + 1)].start();
} else if (power eq 3) {
_root["Explosion_" + (random(2) + 5)].start();
} else if ((power eq 4) or (power eq 5)) {
}
}
function MammonthTankTrace() {
if (_root.trace_mammoth != 0) {
_root.game.mammoth_tank_onthefield = 1;
mammoth_tank_onthefield = 0;
_root.trace_mammoth = 0;
}
}
function Spawn(unit_id) {
var _local2 = 0;
while (_local2 < _root.max_enemies) {
if (_root.game["enemy" + _local2]) {
} else {
the_chosen_Y = 30;
var _local4 = 0;
while (_local4 < _root.shirina_potoka_mobov) {
if (_root.metod_sortirovki_unitov eq 1) {
if (vverh_vniz eq 1) {
polojenie_y = 30 + _local4;
} else {
polojenie_y = 30 - _local4;
}
} else if (_root.metod_sortirovki_unitov eq 2) {
polojenie_y = (2 * random(_root.shirina_potoka_mobov)) - _root.shirina_potoka_mobov;
}
if (_root.respawn_pattern eq 2) {
if ((((((((((_local2 eq 1) or (_local2 eq 3)) or (_local2 eq 5)) or (_local2 eq 7)) or (_local2 eq 9)) or (_local2 eq 11)) or (_local2 eq 13)) or (_local2 eq 15)) or (_local2 eq 17)) or (_local2 eq 19)) {
polojenie_x = -500;
} else {
polojenie_x = 500;
}
} else if (_root.respawn_pattern eq 1) {
polojenie_x = -500;
} else if (_root.respawn_pattern eq 3) {
polojenie_x = 500;
}
finding_location_failed = 0;
var _local3 = 0;
while (_local3 < _root.max_enemies) {
if (_root.game["enemy" + _local3]) {
distancepox = _root.game["enemy" + _local3]._x - polojenie_x;
distancepoy = _root.game["enemy" + _local3]._y - polojenie_y;
distancecheck = Math.sqrt((distancepox * distancepox) + (distancepoy * distancepoy));
}
if (((polojenie_y - 5) < _root.game.upper_wall._y) or ((polojenie_y + 5) > _root.game.bottom_wall._y)) {
fail_des1u = 1;
} else {
fail_des1u = 0;
}
radius_summa_desu = (_root["enemy_diameter_" + unit_id] / 2) + _root.game["enemy" + _local3].radius;
if ((distancecheck < (radius_summa_desu + _root.rasstoyanie_mejdu_unitami)) and (fail_des1u != 1)) {
finding_location_failed = 1;
break;
}
_local3++;
}
if (vverh_vniz != 1) {
vverh_vniz = 1;
} else {
vverh_vniz = 0;
}
if (finding_location_failed != 1) {
if (polojenie_y eq 30) {
polojenie_y = 30.1;
}
the_chosen_Y = polojenie_y;
_local4 = 0;
break;
}
_local4++;
}
if (_root.enemies_onthefield eq 0) {
the_chosen_Y = 30.1;
}
if (the_chosen_Y != 30) {
duplicateMovieClip (_root.game.enemy, "enemy" + _local2, _local2 + 30);
if (_root.respawn_pattern eq 2) {
if ((((((((((_local2 eq 1) or (_local2 eq 3)) or (_local2 eq 5)) or (_local2 eq 7)) or (_local2 eq 9)) or (_local2 eq 11)) or (_local2 eq 13)) or (_local2 eq 15)) or (_local2 eq 17)) or (_local2 eq 19)) {
_root.game["enemy" + _local2]._x = -500;
_root.game["enemy" + _local2].birth = "lefty";
} else {
_root.game["enemy" + _local2]._x = 500;
_root.game["enemy" + _local2].birth = "righty";
}
} else if (_root.respawn_pattern eq 3) {
_root.game["enemy" + _local2]._x = 500;
_root.game["enemy" + _local2].birth = "righty";
} else if (_root.respawn_pattern eq 1) {
_root.game["enemy" + _local2]._x = -500;
_root.game["enemy" + _local2].birth = "lefty";
}
_root.game["enemy" + _local2]._y = the_chosen_Y;
_root.game["enemy" + _local2].gooo = 1;
_root.game["enemy" + _local2].unit_chosen = unit_id;
_root.game["enemy" + _local2].radius = _root["enemy_diameter_" + unit_id] / 2;
if (unit_id eq 13) {
if (_root.wave eq 6) {
_root.game["enemy" + _local2].bossmode = 1;
}
_root.game["enemy" + _local2].unit_chosen = 3;
_root.game["enemy" + _local2].second_modification = 1;
}
}
break;
}
_local2++;
}
}
function ShockwaveColumnSucking(enemy, iks, igrik) {
implosion_radius = 150;
x1 = _root.game[enemy]._x;
y1 = _root.game[enemy]._y;
x2 = iks;
y2 = igrik;
var _local5 = x1 - x2;
var _local7 = y1 - y2;
var _local19 = Math.sqrt((_local5 * _local5) + (_local7 * _local7));
if (_local19 < implosion_radius) {
implosion_mass = 3;
implosion_suckingpower = -3;
var _local6 = _root.game[enemy].mass;
var _local8 = implosion_mass;
var _local16 = _root.game[enemy].xspeed;
var _local18 = _root.game[enemy].yspeed;
var _local12 = Math.atan2(_local7, _local5);
var _local3 = Math.cos(_local12);
var _local2 = Math.sin(_local12);
var _local13 = (_local16 * _local3) + (_local18 * _local2);
var _local10 = implosion_suckingpower;
var _local11 = (_local18 * _local3) - (_local16 * _local2);
var _local9 = 0.0001;
var _local17 = (_local6 * _local13) + (_local8 * _local10);
var _local20 = _local13 - _local10;
var _local14 = (_local17 + (_local6 * _local20)) / (_local6 + _local8);
var _local15 = (_local14 - _local13) + _local10;
_local13 = _local15;
_local10 = _local14;
_local16 = (_local13 * _local3) - (_local11 * _local2);
var _local21 = (_local10 * _local3) - (_local9 * _local2);
_local18 = (_local11 * _local3) + (_local13 * _local2);
var _local22 = (_local9 * _local3) + (_local10 * _local2);
_root.game[enemy].xspeed = _local16;
_root.game[enemy].yspeed = _local18;
}
}
function TremorColumnEffect(enemy, iks, igrik, tower_id) {
implosion_radius = 100;
x1 = _root.game[enemy]._x;
y1 = _root.game[enemy]._y;
x2 = iks;
y2 = igrik;
var _local5 = x1 - x2;
var _local7 = y1 - y2;
var _local19 = Math.sqrt((_local5 * _local5) + (_local7 * _local7));
if (_local19 < implosion_radius) {
_root.game["tremor_tower_" + tower_id].visual.play();
implosion_mass = 20;
tremor_power = _root.tremor_power;
var _local6 = _root.game[enemy].mass;
var _local8 = implosion_mass;
var _local16 = _root.game[enemy].xspeed;
var _local18 = _root.game[enemy].yspeed;
var _local12 = Math.atan2(_local7, _local5);
var _local3 = Math.cos(_local12);
var _local2 = Math.sin(_local12);
var _local13 = (_local16 * _local3) + (_local18 * _local2);
var _local10 = tremor_power;
var _local11 = (_local18 * _local3) - (_local16 * _local2);
var _local9 = 0.0001;
var _local17 = (_local6 * _local13) + (_local8 * _local10);
var _local20 = _local13 - _local10;
var _local14 = (_local17 + (_local6 * _local20)) / (_local6 + _local8);
var _local15 = (_local14 - _local13) + _local10;
_local13 = _local15;
_local10 = _local14;
_local16 = (_local13 * _local3) - (_local11 * _local2);
var _local21 = (_local10 * _local3) - (_local9 * _local2);
_local18 = (_local11 * _local3) + (_local13 * _local2);
var _local22 = (_local9 * _local3) + (_local10 * _local2);
_root.game[enemy].xspeed = _local16;
_root.game[enemy].yspeed = _local18;
}
}
function BallcatcherEffect(ball, iks, igrik, tower_id) {
if (_root.game[ball].type_ eq 8) {
ballcatcher_mass = 250;
ballcatcher_power_max = -60;
ballcatcher_radius_max = 120;
ballcatcher_radius_min = 10;
speed_amplifier = 1.035;
} else {
ballcatcher_mass = 30;
ballcatcher_power_max = -30;
ballcatcher_radius_max = 120;
ballcatcher_radius_min = 10;
speed_amplifier = 1.035;
}
x1 = _root.game[ball]._x;
y1 = _root.game[ball]._y;
x2 = iks;
y2 = igrik;
var _local6 = x1 - x2;
var _local8 = y1 - y2;
var _local5 = Math.sqrt((_local6 * _local6) + (_local8 * _local8));
if ((_local5 < ballcatcher_radius_max) and (_local5 > ballcatcher_radius_min)) {
ballcatcher_power = (ballcatcher_power_max * _local5) / ballcatcher_radius_max;
if (_local5 < (ballcatcher_radius_max * 0.9)) {
_root.game[ball].xspeed = _root.game[ball].xspeed * speed_amplifier;
_root.game[ball].yspeed = _root.game[ball].yspeed * speed_amplifier;
}
_root.game["ballcatcher_" + tower_id].rotations++;
_root.game["ballcatcher_" + tower_id].visual.play();
var _local7 = _root.game[ball].mass;
var _local9 = ballcatcher_mass;
var _local17 = _root.game[ball].xspeed;
var _local19 = _root.game[ball].yspeed;
var _local13 = Math.atan2(_local8, _local6);
var _local4 = Math.cos(_local13);
var _local3 = Math.sin(_local13);
var _local14 = (_local17 * _local4) + (_local19 * _local3);
var _local11 = ballcatcher_power;
var _local12 = (_local19 * _local4) - (_local17 * _local3);
var _local10 = 0.0001;
var _local18 = (_local7 * _local14) + (_local9 * _local11);
var _local20 = _local14 - _local11;
var _local15 = (_local18 + (_local7 * _local20)) / (_local7 + _local9);
var _local16 = (_local15 - _local14) + _local11;
_local14 = _local16;
_local11 = _local15;
_local17 = (_local14 * _local4) - (_local12 * _local3);
var _local22 = (_local11 * _local4) - (_local10 * _local3);
_local19 = (_local12 * _local4) + (_local14 * _local3);
var _local23 = (_local10 * _local4) + (_local11 * _local3);
_root.game[ball].xspeed = _local17;
_root.game[ball].yspeed = _local19;
}
}
function DropShockwaveTower() {
var _local2 = 0;
while (_local2 < 5) {
if (_root.game["shockwave_tower_" + _local2]) {
} else {
duplicateMovieClip (_root.game.shockwave_tower_source, "shockwave_tower_" + _local2, _local2 + 100);
_root.game["shockwave_tower_" + _local2]._x = _root.game._xmouse;
_root.game["shockwave_tower_" + _local2]._y = _root.game._ymouse;
_root.deploy_snd.start();
break;
}
_local2++;
}
}
function DropTremorTower() {
var _local2 = 0;
while (_local2 < 5) {
if (_root.game["tremor_tower_" + _local2]) {
} else {
duplicateMovieClip (_root.game.tremor_tower_source, "tremor_tower_" + _local2, _local2 + 10);
_root.game["tremor_tower_" + _local2]._x = _root.game._xmouse;
_root.game["tremor_tower_" + _local2]._y = _root.game._ymouse;
_root.deploy_snd.start();
break;
}
_local2++;
}
}
function DropBallcatcher() {
var _local2 = 0;
while (_local2 < 5) {
if (_root.game["ballcatcher_" + _local2]) {
} else {
duplicateMovieClip (_root.game.ballcatcher_source, "ballcatcher_" + _local2, _local2 + 20);
_root.game["ballcatcher_" + _local2]._x = _root.game._xmouse;
_root.game["ballcatcher_" + _local2]._y = _root.game._ymouse;
_root.deploy_snd.start();
break;
}
_local2++;
}
}
function BlackHoleEffect(targ, iks, igrik) {
blackhole_mass = 0.2;
blackhole_power_max = -80;
blackhole_power_min = -5;
blackhole_radius = 500;
event_horizon = 50;
speed_amplifier = 1.05;
x1 = _root.game[targ]._x;
y1 = _root.game[targ]._y;
x2 = iks;
y2 = igrik;
var _local6 = x1 - x2;
var _local8 = y1 - y2;
var _local5 = Math.sqrt((_local6 * _local6) + (_local8 * _local8));
if (_local5 < blackhole_radius) {
blackhole_power = blackhole_power_min + ((blackhole_power_max * blackhole_radius) / _local5);
if (_local5 < event_horizon) {
_root.game[targ].suckedintohole = 1;
}
_root.game[targ].yspeed = _root.game[targ].yspeed * speed_amplifier;
_root.game["blackhole_" + tower_id].rotations++;
_root.game["blackhole_" + tower_id].visual.play();
var _local7 = _root.game[targ].mass;
var _local9 = blackhole_mass;
var _local17 = _root.game[targ].xspeed;
var _local19 = _root.game[targ].yspeed;
var _local13 = Math.atan2(_local8, _local6);
var _local4 = Math.cos(_local13);
var _local3 = Math.sin(_local13);
var _local14 = (_local17 * _local4) + (_local19 * _local3);
var _local11 = blackhole_power;
var _local12 = (_local19 * _local4) - (_local17 * _local3);
var _local10 = 0.0001;
var _local18 = (_local7 * _local14) + (_local9 * _local11);
var _local20 = _local14 - _local11;
var _local15 = (_local18 + (_local7 * _local20)) / (_local7 + _local9);
var _local16 = (_local15 - _local14) + _local11;
_local14 = _local16;
_local11 = _local15;
_local17 = (_local14 * _local4) - (_local12 * _local3);
var _local21 = (_local11 * _local4) - (_local10 * _local3);
_local19 = (_local12 * _local4) + (_local14 * _local3);
var _local22 = (_local10 * _local4) + (_local11 * _local3);
_root.game[targ].xspeed = _local17;
_root.game[targ].yspeed = _local19;
}
}
function MoveTarget(target) {
targeted_item = _root.game[target];
targeted_item.tempx = targeted_item.xpos + targeted_item.xspeed;
targeted_item.tempy = targeted_item.ypos + targeted_item.yspeed;
}
function RenderTargets(target) {
targeted_item = _root.game[target];
targeted_item.xpos = targeted_item.tempx;
targeted_item.ypos = targeted_item.tempy;
targeted_item._x = targeted_item.xpos;
targeted_item._y = targeted_item.ypos;
}
Crafted_By = "Project Gravity Launcher (c) DimonZerg aka DZ / 2007 / dimonzerg.narod.ru";
if (_root.ball_type eq 1) {
pokazatel_stabilnosty = 5;
minimalnaya_stabilnost = 75;
maximalnaya_stabilnost = 95;
maxspeed_source = 15;
} else if (_root.ball_type eq 2) {
pokazatel_stabilnosty = 2.5;
minimalnaya_stabilnost = 80;
maximalnaya_stabilnost = 100;
maxspeed_source = 20;
} else if (_root.ball_type eq 3) {
pokazatel_stabilnosty = 2.5;
minimalnaya_stabilnost = 50;
maximalnaya_stabilnost = 80;
maxspeed_source = 30;
} else if (_root.ball_type eq 4) {
pokazatel_stabilnosty = 2.5;
minimalnaya_stabilnost = 15;
maximalnaya_stabilnost = 35;
maxspeed_source = 25;
} else if (_root.ball_type eq 5) {
pokazatel_stabilnosty = 2.5;
minimalnaya_stabilnost = 15;
maximalnaya_stabilnost = 50;
maxspeed_source = 10;
} else if (_root.ball_type eq 7) {
pokazatel_stabilnosty = 2.5;
minimalnaya_stabilnost = 40;
maximalnaya_stabilnost = 70;
maxspeed_source = 23;
} else if (_root.ball_type eq 8) {
pokazatel_stabilnosty = 2.5;
minimalnaya_stabilnost = 1;
maximalnaya_stabilnost = 40;
maxspeed_source = 10;
} else if (_root.ball_type eq 9) {
pokazatel_stabilnosty = 2.5;
minimalnaya_stabilnost = 1;
maximalnaya_stabilnost = 50;
maxspeed_source = 30;
} else if (_root.ball_type eq 10) {
pokazatel_stabilnosty = 0.1;
minimalnaya_stabilnost = 100;
maximalnaya_stabilnost = 100;
maxspeed_source = 20;
}
if (_root.stabilityup_maxed eq 1) {
minimalnaya_stabilnost = 100;
maximalnaya_stabilnost = 100;
}
if (_root.ultraspeed_activated eq 1) {
maxspeed = maxspeed_source * 2;
} else {
maxspeed = maxspeed_source;
}
_root.gravity_nuke_hueg_dmg = random(500);
_root.gravity_nuke_radius_dmg = random(150);
_root.implosion_loading_time_real = _root.implosion_loading_time;
_root.shockwave_loading_time_real = _root.shockwave_loading_time;
if (_root.extreme_mode_activated eq 1) {
extremomode_enemybonus = 1.4;
_root.small_tank_hp = 900 * extremomode_enemybonus;
_root.hover_tank_hp = 700 * extremomode_enemybonus;
_root.mech1_hp = 1000 * extremomode_enemybonus;
_root.mech2_hp = 3000 * extremomode_enemybonus;
_root.black_tank_hp = 2000 * extremomode_enemybonus;
_root.lazer_tank_hp = 1300 * extremomode_enemybonus;
_root.kindabike_hp = 1500 * extremomode_enemybonus;
_root.kindabike2_hp = 1200 * extremomode_enemybonus;
_root.mammoth_tank_hp = 11000 * extremomode_enemybonus;
_root.mammoth_tank2_hp = 10000 * extremomode_enemybonus;
_root.railgrav_tank_hp = 700 * extremomode_enemybonus;
_root.heavy_tank_hp = 4000 * extremomode_enemybonus;
_root.nuketruck_hp = 2000 * extremomode_enemybonus;
_root.sciencevessel_hp = 2500 * extremomode_enemybonus;
_root.clinch_tank_hp = 11000 * extremomode_enemybonus;
_root.smooth_tank_hp = 2700 * extremomode_enemybonus;
} else {
_root.small_tank_hp = 900;
_root.hover_tank_hp = 700;
_root.mech1_hp = 1000;
_root.mech2_hp = 3000;
_root.black_tank_hp = 2000;
_root.lazer_tank_hp = 1300;
_root.kindabike_hp = 1500;
_root.kindabike2_hp = 1200;
_root.mammoth_tank_hp = 11000;
_root.mammoth_tank2_hp = 10000;
_root.railgrav_tank_hp = 700;
_root.heavy_tank_hp = 4000;
_root.nuketruck_hp = 2000;
_root.sciencevessel_hp = 2500;
_root.clinch_tank_hp = 11000;
_root.smooth_tank_hp = 2700;
}
if (_root.game_modo eq 1) {
_root.initial_lives = 40;
_root.structure_max = 1000;
_root.implosion_loading_time = 35;
_root.shockwave_loading_time = 30;
_root.manipulator_loading_time = 20;
_root.manipulator2_loading_time = 20;
_root.hacking_loading_time = 5;
_root.ballcatcher_loading_time = 5;
_root.shock_tower_loading_time = 5;
_root.tremor_tower_loading_time = 5;
_root.tier2projectiles_loading_time = 15;
_root.hacking_loading_time = 5;
_root.structure_regen = 0.05;
} else if ((_root.game_modo eq 2) or (_root.game_modo eq 3)) {
if (_root.game_modo eq 2) {
_root.initial_lives = 5;
} else {
_root.initial_lives = 3;
}
_root.structure_max = 650;
_root.implosion_loading_time = 25;
_root.shockwave_loading_time = 25;
_root.shock_tower_loading_time = 5;
_root.tremor_tower_loading_time = 5;
_root.manipulator_loading_time = 20;
_root.manipulator2_loading_time = 20;
_root.antimatter_loading_time = 25;
_root.tier2projectiles_loading_time = 5;
_root.hacking_loading_time = 5;
_root.ballcatcher_loading_time = 5;
_root.structure_regen = 0.1;
} else if (_root.game_modo eq 4) {
_root.initial_lives = 1000;
_root.structure_max = 10000;
_root.implosion_loading_time = 20;
_root.shock_tower_loading_time = 5;
_root.tremor_tower_loading_time = 5;
_root.shockwave_loading_time = 20;
_root.manipulator_loading_time = 20;
_root.manipulator2_loading_time = 3;
_root.antimatter_loading_time = 20;
_root.tier2projectiles_loading_time = 1;
_root.hacking_loading_time = 5;
_root.ballcatcher_loading_time = 5;
_root.structure_regen = 0.1;
} else {
_root.initial_lives = 10;
_root.structure_regen = 0.1;
}
if (resetvariables != "yiff") {
resetvariables = "yiff";
_root.enemy_speed = 1;
_root.launcher_location = 1;
_root.respawn_pattern = 2;
_root.metod_sortirovki_unitov = 1;
_root.ball_type = 1;
maxspeed = 20;
_root.dla_skolkih_unitov_funkcii = 10;
_root.max_enemies = 10;
_root.powerup_respawn_rate = 15;
_root.powerup_timeout = 7;
koef_oslableniya_dmg_po_baze = 0.04;
_root.structure_max = 1000;
_root.structure = _root.structure_max;
_root.energy_max = 1000;
_root.energy = _root.energy_max;
_root.energy_regen = 2;
_root.structure_regen = 0.05;
_root.shirina_potoka_mobov = 70;
_root.rasstoyanie_mejdu_unitami = 10;
_root.ball_type_energycost_1 = 250;
_root.ball_type_energycost_2 = 300;
_root.ball_type_energycost_3 = 550;
_root.ball_type_energycost_4 = 700;
_root.ball_type_energycost_5 = 500;
_root.ball_type_energycost_7 = 400;
_root.ball_type_energycost_8 = 700;
_root.ball_type_energycost_9 = 500;
_root.ball_type_energycost_10 = 200;
_root.implosion_energycost_max = 700;
_root.shockwave_energycost_max = 600;
_root.antimatter_energycost = _root.ball_type_energycost_10;
_root.stability_bonus_per_level = 3.5;
_root.energy_bonus_per_level = 3.5;
_root.implosion_loading_time = 35;
_root.shockwave_loading_time = 30;
_root.manipulator_loading_time = 20;
_root.manipulator2_loading_time = 20;
_root.antimatter_loading_time = 35;
_root.tier2projectiles_loading_time = 15;
_root.hacking_loading_time = 5;
_root.ballcatcher_loading_time = 5;
_root.implosion_points_max = 15;
_root.antimatter_points_max = 15;
_root.shockwave_points_max = 6;
_root.manipulator_points_max = 25;
_root.manipulator_points_step_1 = 5;
_root.manipulator_points_step_2 = 10;
_root.manipulator2_points_max = 5;
_root.hacking_points_max = 5;
_root.ballcatcher_points_max = 10;
_root.tremor_points_max = 5;
_root.shocktower_points_max = 15;
_root.small_tank_hp = 900;
_root.hover_tank_hp = 700;
_root.mech1_hp = 1000;
_root.mech2_hp = 3000;
_root.black_tank_hp = 2000;
_root.lazer_tank_hp = 1300;
_root.kindabike_hp = 1500;
_root.kindabike2_hp = 1200;
_root.mammoth_tank_hp = 11000;
_root.mammoth_tank2_hp = 10000;
_root.railgrav_tank_hp = 700;
_root.heavy_tank_hp = 4000;
_root.nuketruck_hp = 2000;
_root.sciencevessel_hp = 2500;
ball_targeting = 0;
mammoth_timer = 0;
maxdistance = 90;
collision_count = 0;
zashita_ot_skleivaniya_count = 0;
mammoth_tank_onthefield = 0;
_root.skill_points = 0;
_root.energy_points = 0;
_root.stability_points = 0;
_root.projectile_points = 0;
_root.shockwave_points = 0;
_root.implosion_points = 0;
_root.manipulator_points = 0;
_root.manipulator2_points = 0;
_root.hacking_points = 0;
_root.ballcatcher_points = 0;
_root.antimatter_points = 0;
_root.shocktower_points = 0;
_root.tremor_points = 0;
_root.enemy_diameter_0 = 26.6;
_root.enemy_diameter_1 = 30.5;
_root.enemy_diameter_2 = 26.6;
_root.enemy_diameter_3 = 82.9;
_root.enemy_diameter_4 = 44.7;
_root.enemy_diameter_5 = 33.4;
_root.enemy_diameter_6 = 44.7;
_root.enemy_diameter_7 = 30.5;
_root.enemy_diameter_8 = 44.7;
_root.enemy_diameter_9 = 44.7;
_root.enemy_diameter_10 = 44.7;
_root.enemy_diameter_11 = 30.5;
_root.enemy_diameter_12 = 30.5;
_root.enemy_diameter_14 = 82.9;
_root.enemy_diameter_15 = 44.7;
_root.wave_timer_rough = 0;
_root.extreme_mode_activated = 0;
_root.game_on_hold = 1;
_root.base_dead = 0;
_root.score = 0;
_root.misses = 0;
_root.showwhichballinfo = 0;
_root.lvl = 1;
_root.survival_trigger_1 = 0;
_root.survival_timer_1 = 0;
_root.survival_timer_2 = 0;
_root.stoptime = 20;
_root.wave = 1;
_root.skill_points = 0;
_root.ball_captured = 0;
_root.kills_count = 0;
_root.kills_exp_count = 0;
_root.kills_max = 0;
_root.victory = 0;
_root.tremor_power = 0;
_root.stop_all_respawns = 1;
_root.ultraspeed_activated = 0;
_root.death_animation_ended = 0;
_root.gravity_nuke_in_action = 0;
_root.blackhole_activated = 0;
_root.limit_unstable_zone = 0;
_root.current_energy_cost = 1;
_root.stability_rating = 100;
_root.speed = 0;
_root.heavy_tank_count = 0;
_root.shakescreen = 0;
_root.trace_mammoth = 0;
_root.explosions_count = 0;
_root.enemy_count = 0;
_root.enemies_onthefield = 0;
_root.kursor = 1;
_root.shleifcount = 0;
_root.ball_ready_to_launch = 0;
_root.powerups_count = 0;
function_timer_2 = 0;
_root.antimatter_time = 0;
_root.antimatter_time_bonus = 10;
_root.speedup_time = 0;
_root.speedup_time_bonus = 10;
_root.energyup_time = 0;
_root.energyup_time_bonus = 10;
_root.structureup_time = 0;
_root.structureup_time_bonus = 10;
_root.nodelay_time = 0;
_root.nodelay_time_bonus = 10;
_root.stabilityup_time = 0;
_root.stabilityup_time_bonus = 10;
_root.shock_tower_timeout = 0;
_root.tremor_tower_timeout = 0;
_root.shockwave_timeout = 0;
_root.manipulator_timeout = 0;
_root.manipulator2_timeout = 0;
_root.hacking_timeout = 0;
_root.ballcatcher_timeout = 0;
_root.implosion_timeout = 0;
_root.tier2projectiles_timeout = 0;
_root.manipulator_available = 0;
_root.manipulator2_available = 0;
_root.hacking_available = 0;
_root.ballcatcher_available = 0;
_root.shockwave_available = 0;
_root.implosion_available = 0;
_root.antimatter_available = 0;
_root.shock_tower_available = 0;
_root.tremor_tower_available = 0;
_root.enemy_alive_0 = 0;
_root.enemy_alive_1 = 0;
_root.enemy_alive_2 = 0;
_root.enemy_alive_3 = 0;
_root.enemy_alive_4 = 0;
_root.enemy_alive_5 = 0;
_root.enemy_alive_6 = 0;
_root.enemy_alive_7 = 0;
_root.enemy_alive_8 = 0;
_root.enemy_alive_9 = 0;
_root.enemy_alive_10 = 0;
_root.enemy_alive_11 = 0;
_root.enemy_alive_12 = 0;
_root.enemy_alive_13 = 0;
_root.enemy_alive_14 = 0;
_root.enemy_alive_15 = 0;
_root.enemy_alive_16 = 0;
_root.enemy_alive_17 = 0;
_root.enemy_alive_18 = 0;
_root.enemy_alive_19 = 0;
_root.enemy_alive_20 = 0;
_root.enemy_alive_21 = 0;
_root.enemy_alive_22 = 0;
_root.enemy_alive_23 = 0;
_root.enemy_alive_24 = 0;
_root.enemy_alive_25 = 0;
_root.ball_type_available_1 = 1;
_root.ball_type_available_2 = 0;
_root.ball_type_available_3 = 0;
_root.ball_type_available_4 = 0;
_root.ball_type_available_5 = 0;
_root.ball_type_available_7 = 0;
_root.ball_type_available_8 = 0;
_root.ball_type_available_9 = 0;
mammoth_tank_rr = 0;
mammoth_tank2_rr = 0;
kindabike_rr = 0;
ord_tank_rr = 0;
lazer_tank_rr = 0;
hover_tank_rr = 0;
heavy_tank_rr = 0;
railgrav_tank_rr = 0;
nuketruck_rr = 0;
black_tank_rr = 0;
mech2_rr = 0;
mech1_rr = 0;
kindabike2_rr = 0;
sciencevessel_rr = 0;
if (_root.game_modo eq 4) {
_root.lvl = 16;
_root.skill_points = 600;
}
}
if (soundsset != 1337) {
soundsset = 1337;
_root.ball_bounce_1 = new Sound();
_root.ball_bounce_1.attachSound("ball_bounce_1");
_root.ball_bounce_2 = new Sound();
_root.ball_bounce_2.attachSound("ball_bounce_2");
_root.ball_fly_1 = new Sound();
_root.ball_fly_1.attachSound("ball_fly_1");
_root.ball_fly_2 = new Sound();
_root.ball_fly_2.attachSound("ball_fly_2");
_root.balltoenemy_impact1 = new Sound();
_root.balltoenemy_impact1.attachSound("balltoenemy_impact1");
_root.balltoenemy_impact2 = new Sound();
_root.balltoenemy_impact2.attachSound("balltoenemy_impact2");
_root.impact_enemy2wall_1 = new Sound();
_root.impact_enemy2wall_1.attachSound("impact_enemy2wall_1");
_root.impact_enemy2wall_2 = new Sound();
_root.impact_enemy2wall_2.attachSound("impact_enemy2wall_2");
_root.impact_enemy2wall_3 = new Sound();
_root.impact_enemy2wall_3.attachSound("impact_enemy2wall_3");
_root.impact_enemy2wall_4 = new Sound();
_root.impact_enemy2wall_4.attachSound("impact_enemy2wall_4");
_root.impact_enemy2enemy_1 = new Sound();
_root.impact_enemy2enemy_1.attachSound("impact_enemy2enemy_1");
_root.impact_enemy2enemy_2 = new Sound();
_root.impact_enemy2enemy_2.attachSound("impact_enemy2enemy_2");
_root.impact_enemy2enemy_3 = new Sound();
_root.impact_enemy2enemy_3.attachSound("impact_enemy2enemy_3");
_root.impact_enemy2enemy_4 = new Sound();
_root.impact_enemy2enemy_4.attachSound("impact_enemy2enemy_4");
_root.impact_enemy2enemy_5 = new Sound();
_root.impact_enemy2enemy_5.attachSound("impact_enemy2enemy_5");
_root.impact_enemy2enemy_6 = new Sound();
_root.impact_enemy2enemy_6.attachSound("impact_enemy2enemy_6");
_root.impact_enemy2enemy_7 = new Sound();
_root.impact_enemy2enemy_7.attachSound("impact_enemy2enemy_7");
_root.impact_enemy2enemy_8 = new Sound();
_root.impact_enemy2enemy_8.attachSound("impact_enemy2enemy_8");
_root.impact_enemy2enemy_9 = new Sound();
_root.impact_enemy2enemy_9.attachSound("impact_enemy2enemy_9");
_root.impact_enemy2enemy_10 = new Sound();
_root.impact_enemy2enemy_10.attachSound("impact_enemy2enemy_10");
_root.impact_enemy2enemy_11 = new Sound();
_root.impact_enemy2enemy_11.attachSound("impact_enemy2enemy_11");
_root.Explosion_1 = new Sound();
_root.Explosion_1.attachSound("Explosion_1");
_root.Explosion_2 = new Sound();
_root.Explosion_2.attachSound("Explosion_2");
_root.Explosion_3 = new Sound();
_root.Explosion_3.attachSound("Explosion_3");
_root.Explosion_4 = new Sound();
_root.Explosion_4.attachSound("Explosion_4");
_root.Explosion_5 = new Sound();
_root.Explosion_5.attachSound("Explosion_5");
_root.Explosion_6 = new Sound();
_root.Explosion_6.attachSound("Explosion_6");
_root.deploy_snd = new Sound();
_root.deploy_snd.attachSound("deploy");
_root.hacking_snd = new Sound();
_root.hacking_snd.attachSound("hacking");
}
_root.game_on_hold = 0;
var i = 0;
while (i < _root.dla_skolkih_unitov_funkcii) {
if (_root.game["enemy" + i]) {
_root["enemy_alive_" + i] = 1;
} else {
_root["enemy_alive_" + i] = 0;
}
i++;
}
_root.enemies_onthefield = ((((((((((((((((((((((((_root.enemy_alive_0 + _root.enemy_alive_1) + _root.enemy_alive_2) + _root.enemy_alive_3) + _root.enemy_alive_4) + _root.enemy_alive_5) + _root.enemy_alive_6) + _root.enemy_alive_7) + _root.enemy_alive_8) + _root.enemy_alive_9) + _root.enemy_alive_10) + _root.enemy_alive_11) + _root.enemy_alive_12) + _root.enemy_alive_13) + _root.enemy_alive_14) + _root.enemy_alive_15) + _root.enemy_alive_16) + _root.enemy_alive_17) + _root.enemy_alive_18) + _root.enemy_alive_19) + _root.enemy_alive_20) + _root.enemy_alive_21) + _root.enemy_alive_22) + _root.enemy_alive_23) + _root.enemy_alive_24) + _root.enemy_alive_25;
if (_root.stop_all_respawns != 0) {
_root.stop_all_respawns = 0;
mammoth_tank_rr = 0;
mammoth_tank2_rr = 0;
kindabike_rr = 0;
kindabike2_rr = 0;
ord_tank_rr = 0;
lazer_tank_rr = 0;
hover_tank_rr = 0;
heavy_tank_rr = 0;
railgrav_tank_rr = 0;
nuketruck_rr = 0;
mech1_rr = 0;
black_tank_rr = 0;
mech2_rr = 0;
sciencevessel_rr = 0;
clinch_tank_rr = 0;
smooth_tank_rr = 0;
}
_root.stability_skillbonus = _root.stability_points * _root.stability_bonus_per_level;
_root.energy_max = 1000 + (_root.energy_points * (1000 * (_root.energy_bonus_per_level / 100)));
_root.energy_regen = (2 + (0.05 * _root.energy_points)) * _root.energy_regen_multiplyer;
if ((_root.manipulator_points >= _root.manipulator_points_step_1) and (_root.manipulator_points < _root.manipulator_points_step_2)) {
_root.manipulator_available = 1;
_root.manipulator_lvl = 1;
} else if ((_root.manipulator_points >= _root.manipulator_points_step_2) and (_root.manipulator_points < _root.manipulator_points_max)) {
_root.manipulator_available = 1;
_root.manipulator_lvl = 2;
} else if (_root.manipulator_points >= _root.manipulator_points_max) {
_root.manipulator_available = 1;
_root.manipulator_lvl = 3;
}
if (_root.shockwave_points >= _root.shockwave_points_max) {
_root.shockwave_available = 1;
}
if (_root.antimatter_points >= _root.antimatter_points_max) {
_root.antimatter_available = 1;
}
if (_root.implosion_points >= _root.implosion_points_max) {
_root.implosion_available = 1;
}
if (_root.manipulator2_points >= _root.manipulator2_points_max) {
_root.manipulator2_available = 1;
}
if (_root.hacking_points >= _root.hacking_points_max) {
_root.hacking_available = 1;
}
if (_root.ballcatcher_points >= _root.ballcatcher_points_max) {
_root.ballcatcher_available = 1;
}
if (_root.shocktower_points >= _root.shocktower_points_max) {
_root.shock_tower_available = 1;
}
if (_root.tremor_points >= _root.tremor_points_max) {
_root.tremor_tower_available = 1;
}
if ((_root.structure <= 0) and (_root.base_dead != 1)) {
_root.base_dead = 1;
_root.game.base_death._visible = true;
_root.game.base_death.gotoAndPlay(2);
}
if (_root.game_on_hold eq 1) {
_root.stop_all_respawns = 1;
_root.structure = _root.structure_max;
_root.energy = _root.energy_max;
_root.antimatter_timeout = 0;
_root.shockwave_timeout = 0;
_root.manipulator_timeout = 0;
_root.implosion_timeout = 0;
_root.tier2projectiles_timeout = 0;
_root.kursor = 1;
removeMovieClip(_root.game.ball1);
removeMovieClip(_root.game.ball2);
removeMovieClip(_root.game.ball3);
removeMovieClip(_root.game.ball4);
removeMovieClip(_root.game.ball5);
_root.ball_ready_to_launch = 0;
_root.game.launch._visible = false;
} else {
_root.game.launch._visible = true;
}
if (_root.victory eq 1) {
_root.kursor = 1;
removeMovieClip(_root.game.ball1);
removeMovieClip(_root.game.ball2);
removeMovieClip(_root.game.ball3);
removeMovieClip(_root.game.ball4);
removeMovieClip(_root.game.ball5);
_root.ball_ready_to_launch = 0;
_root.game.launch._visible = false;
_root.ingame_menu.gotoAndStop(1);
_root.levelup_menu.gotoAndStop(1);
_root.ingame_menu._visible = false;
_root.levelup_menu._visible = false;
removeMovieClip(_root.ingame_menu);
removeMovieClip(_root.levelup_menu);
_root.victory_menu.gotoAndStop(2);
}
if (_root.base_dead eq 1) {
_root.showwhichballinfo = 0;
_root.ingame_menu.gotoAndStop(1);
_root.levelup_menu.gotoAndStop(1);
_root.ingame_menu._visible = false;
_root.levelup_menu._visible = false;
removeMovieClip(_root.ingame_menu);
removeMovieClip(_root.levelup_menu);
_root.stop_all_respawns = 1;
_root.kursor = 1;
if (_root.death_animation_ended eq 1) {
_root.game_over_menu.gotoAndStop(2);
}
removeMovieClip(_root.game.ball);
removeMovieClip(_root.game.ball1);
removeMovieClip(_root.game.ball2);
removeMovieClip(_root.game.ball3);
removeMovieClip(_root.game.ball4);
removeMovieClip(_root.game.ball5);
removeMovieClip(_root.game.launch);
removeMovieClip(_root.game.lipu4ka);
removeMovieClip(_root.game.zones);
}
if (ball_targeting eq 1) {
lipu4ka._visible = true;
lipu4ka.lp._width = Math.sqrt((lipu4ka_dx * lipu4ka_dx) + (lipu4ka_dy * lipu4ka_dy));
lipu4ka_speed = 1;
var lipu4ka_dx = (_root.game[_root.currentballbeinglaunched]._x - center._x);
var lipu4ka_dy = (_root.game[_root.currentballbeinglaunched]._y - center._y);
var angle1 = (Math.atan2(lipu4ka_dy, lipu4ka_dx) * 57.2957795130823);
var angle2 = lipu4ka._rotation;
if (angle2 < 0) {
angle2 = angle2 + 360;
}
if (angle1 < 0) {
angle1 = angle1 + 360;
}
var a = (angle2 - angle1);
if (a > 180) {
a = a - 360;
} else if (a < -180) {
a = a + 360;
}
a = a * lipu4ka_speed;
if (Math.abs(a) > 0.01) {
lipu4ka._rotation = lipu4ka._rotation - a;
} else {
lipu4ka._rotation = angle1;
}
} else {
lipu4ka._visible = false;
}
if (yifflocationremembered != 1337) {
yifflocationremembered = 1337;
lipu4ka_rx = _root.game.lipu4ka._x;
zones_rx = _root.game.zones._x;
center_rx = _root.game.center._x;
launch_rx = _root.game.launch._x;
base_death_rx = _root.game.base_death._x;
antimatter_chargin_rx = _root.antimatter_chargin._x;
}
sdvig = 267;
if (_root.launcher_location eq 1) {
_root.game.lipu4ka._x = lipu4ka_rx;
_root.game.zones._x = zones_rx;
_root.game.center._x = center_rx;
_root.game.launch._x = launch_rx;
_root.game.base_death._x = base_death_rx;
_root.antimatter_chargin._x = antimatter_chargin_rx;
_root.antimatter_chargin._x = antimatter_chargin_rx - sdvig;
} else if (_root.launcher_location eq 2) {
_root.game.lipu4ka._x = lipu4ka_rx + sdvig;
_root.game.zones._x = zones_rx + sdvig;
_root.game.center._x = center_rx + sdvig;
_root.game.launch._x = launch_rx + sdvig;
_root.game.base_death._x = base_death_rx + sdvig;
_root.antimatter_chargin._x = antimatter_chargin_rx;
} else if (_root.launcher_location eq 3) {
_root.game.lipu4ka._x = (lipu4ka_rx + (sdvig * 2)) + 4;
_root.game.zones._x = (zones_rx + (sdvig * 2)) + 4;
_root.game.center._x = (center_rx + (sdvig * 2)) + 4;
_root.game.launch._x = (launch_rx + (sdvig * 2)) + 4;
_root.game.base_death._x = (base_death_rx + (sdvig * 2)) + 4;
_root.antimatter_chargin._x = (antimatter_chargin_rx + sdvig) + 4;
}
var i = 0;
while (i < _root.dla_skolkih_unitov_funkcii) {
if ((_root.game["enemy" + i].allset eq 1) and (_root.game["enemy" + i].captured != 1)) {
MoveTarget("enemy" + i);
}
i++;
}
var i = (_root.dla_skolkih_unitov_funkcii + 1);
while ((--i) + 1) {
var b1 = ("enemy" + i);
var j = i;
while ((--j) + 1) {
var b2 = ("enemy" + j);
if (_root.game["enemy" + j] and _root.game["enemy" + i]) {
EnemyToEnemyCollisionDetectionAndReaction(b1, b2);
}
}
}
function_timer_2++;
if (function_timer_2 >= 3) {
function_timer_2 = 0;
var i = 0;
while (i < _root.dla_skolkih_unitov_funkcii) {
if (["enemy" + i]) {
var j = 0;
while (j < _root.dla_skolkih_unitov_funkcii) {
if (i != j) {
if (["enemy" + j]) {
ZashitaOtRespaNaOdnomMeste("enemy" + i, "enemy" + j);
}
}
j++;
}
}
i++;
}
}
zashita_ot_skleivaniya_count++;
if (zashita_ot_skleivaniya_count >= 2) {
zashita_ot_skleivaniya_count = 0;
var i = (_root.dla_skolkih_unitov_funkcii + 1);
while ((--i) + 1) {
var b1 = ("enemy" + i);
var j = i;
while ((--j) + 1) {
var b2 = ("enemy" + j);
if (_root.game["enemy" + j] and _root.game["enemy" + i]) {
ZashitaOtSkleivaniya(b1, b2);
}
}
}
}
var i = 0;
while (i < _root.dla_skolkih_unitov_funkcii) {
if ((_root.game["enemy" + i].allset eq 1) and (_root.game["enemy" + i].captured != 1)) {
RenderTargets("enemy" + i);
}
i++;
}
if (_root.blackhole_activated eq 1) {
var i = 0;
while (i < _root.dla_skolkih_unitov_funkcii) {
if (["enemy" + i]) {
BlackHoleEffect("enemy" + i, 7, 2);
}
i++;
}
}
if (_root.game_modo eq 1) {
if (_root.wave eq 1) {
_root.wave_length = 30;
} else if (_root.wave eq 2) {
_root.wave_length = 30;
} else if (_root.wave eq 3) {
_root.wave_length = 30;
} else if (_root.wave eq 4) {
_root.wave_length = 60;
} else if (_root.wave eq 5) {
_root.wave_length = 30;
} else if (_root.wave eq 6) {
_root.wave_length = 30;
} else if (_root.wave eq 7) {
_root.wave_length = 60;
} else if (_root.wave eq 8) {
_root.wave_length = 30;
} else if (_root.wave eq 9) {
_root.wave_length = 30;
} else if (_root.wave eq 10) {
_root.wave_length = 60;
} else if (_root.wave eq 11) {
_root.wave_length = 30;
} else if (_root.wave eq 12) {
_root.wave_length = 60;
} else if (_root.wave eq 13) {
_root.wave_length = 60;
} else if (_root.wave eq 14) {
_root.wave_length = 60;
} else if (_root.wave eq 15) {
_root.wave_length = 100;
} else if (_root.wave eq 16) {
_root.wave_length = 60;
} else if (_root.wave eq 17) {
_root.wave_length = 60;
} else if (_root.wave eq 18) {
_root.wave_length = 60;
} else if (_root.wave eq 19) {
_root.wave_length = 60;
} else if (_root.wave eq 20) {
_root.wave_length = 150;
} else if (_root.wave eq 21) {
_root.wave_length = 60;
} else if (_root.wave eq 22) {
_root.wave_length = 200;
} else if (_root.wave eq 23) {
_root.wave_length = 100;
}
} else if (_root.game_modo != 1) {
_root.wave_length = 10000000 /* 0x989680 */;
}
if (_root.game_on_hold != 1) {
_root.wave_timer_rough = _root.wave_timer_rough + 0.0333333333333333;
elapsed_time = Math.floor(_root.wave_timer_rough);
time_difference = Math.floor(_root.wave_length - _root.wave_timer_rough);
if (time_difference < 0) {
time_difference = 0;
}
_root.time_show = "Time: " + time_difference;
if (_root.game_modo != 1) {
_root.time_show = "Time: " + elapsed_time;
}
} else {
_root.time_show = "Time: Pause";
}
if (time_difference <= 0) {
_root.stop_all_respawns = 1;
}
if ((_root.wave_timer_rough > _root.wave_length) and (_root.enemies_onthefield eq 0)) {
_root.wave++;
if (_root.wave eq 23) {
_root.victory = 1;
} else {
_root.game_on_hold = 1;
_root.wave_timer_rough = 0;
_root.showwhichballinfo = 0;
}
}
if (_root.game_modo eq 2) {
_root.powerup_respawn_rate = 6;
} else if (_root.game_modo eq 3) {
_root.powerup_respawn_rate = 7;
_root.extreme_mode_activated = 1;
}
_root.powerup_respawn_rate = 3;
_root.energy_points = 30;
_root.projectile_points = 7;
_root.stability_points = 30;
_root.implosion_points = _root.implosion_points_max;
_root.antimatter_points = _root.antimatter_points_max;
_root.shockwave_points = _root.shockwave_points_max;
_root.manipulator_points = _root.manipulator_points_max;
_root.manipulator2_points = _root.manipulator2_points_max;
_root.hacking_points = _root.hacking_points_max;
_root.ballcatcher_points = _root.ballcatcher_points_max;
_root.tremor_points = _root.tremor_points_max;
_root.shocktower_points = _root.shocktower_points_max;
Instance of Symbol 165 MovieClip "explosions_small" in Symbol 501 MovieClip Frame 1
onClipEvent (enterFrame) {
if (explosion.remove eq 1) {
removeMovieClip(this);
}
}
Instance of Symbol 184 MovieClip "explosions_medium" in Symbol 501 MovieClip Frame 1
onClipEvent (enterFrame) {
if (explosion.remove eq 1) {
removeMovieClip(this);
}
}
Instance of Symbol 214 MovieClip "explosions_big" in Symbol 501 MovieClip Frame 1
onClipEvent (enterFrame) {
if (explosion.remove eq 1) {
removeMovieClip(this);
}
}
Instance of Symbol 243 MovieClip "explosions_hueg" in Symbol 501 MovieClip Frame 1
onClipEvent (enterFrame) {
if (explosion.remove eq 1) {
removeMovieClip(this);
}
}
Instance of Symbol 285 MovieClip "explosions_nuke" in Symbol 501 MovieClip Frame 1
onClipEvent (enterFrame) {
if (explosion.remove eq 1) {
removeMovieClip(this);
}
}
Instance of Symbol 437 MovieClip "singularity2_source" in Symbol 501 MovieClip Frame 1
onClipEvent (enterFrame) {
if (go eq 1) {
play();
} else {
gotoAndStop (1);
}
}
Instance of Symbol 493 MovieClip "udar" in Symbol 501 MovieClip Frame 1
onClipEvent (enterFrame) {
if (anim.remove eq 1) {
removeMovieClip(this);
}
}
Instance of Symbol 495 MovieClip "upper_wall" in Symbol 501 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Instance of Symbol 498 MovieClip in Symbol 501 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(90000);
this.swapDepths(_root.game.wall1);
removeMovieClip(this);
}
Instance of Symbol 498 MovieClip in Symbol 501 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(90001);
this.swapDepths(_root.game.wall2);
removeMovieClip(this);
}
Instance of Symbol 500 MovieClip "bottom_wall" in Symbol 501 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Symbol 501 MovieClip Frame 2
_root.game.enemy.gotoAndStop(3);
_root.game.enemy._visible = false;
_root.game.ball.gotoAndStop(3);
_root.game.ball._visible = false;
_root.game.shleif.gotoAndStop(20);
_root.game.shleif._visible = false;
_root.game.udar.gotoAndStop(20);
_root.game.udar._visible = false;
_root.game.implosion.gotoAndStop(1);
_root.game.implosion._visible = false;
_root.game.explosions_small.gotoAndStop(55);
_root.game.explosions_small._visible = false;
_root.game.explosions_medium.gotoAndStop(55);
_root.game.explosions_medium._visible = false;
_root.game.explosions_big.gotoAndStop(55);
_root.game.explosions_big._visible = false;
_root.game.explosions_hueg.gotoAndStop(55);
_root.game.explosions_hueg._visible = false;
_root.game.explosions_nuke.gotoAndStop(55);
_root.game.explosions_nuke._visible = false;
_root.game.gravity_shockwave.gotoAndStop(55);
_root.game.gravity_shockwave._visible = false;
_root.game.teh_nuke._visible = false;
if (((_root.ball_ready_to_launch != 1) and (_root.base_dead != 1)) and (_root.game_on_hold != 1)) {
if (_root.game.launch.ball_charging.ball_ready != 1) {
_root.game.launch.ball_charging.play();
} else {
_root.game.launch.ball_charging.gotoAndStop(1);
_root.game.launch.ball_charging.ball_ready = 0;
if (!_root.game.ball1) {
duplicateMovieClip (_root.game.ball, "ball1", 10000);
_root.game.ball1._x = _root.game.center._x - 0.01;
_root.game.ball1._y = _root.game.center._y - 0.01;
_root.game.ball1.sfgfg = 1;
_root.ball_ready_to_launch = 1;
} else if (!_root.game.ball2) {
duplicateMovieClip (_root.game.ball, "ball2", 10001);
_root.game.ball2._x = _root.game.center._x - 0.01;
_root.game.ball2._y = _root.game.center._y - 0.01;
_root.game.ball2.sfgfg = 1;
_root.ball_ready_to_launch = 1;
} else if (!_root.game.ball3) {
duplicateMovieClip (_root.game.ball, "ball3", 10002);
_root.game.ball3._x = _root.game.center._x - 0.01;
_root.game.ball3._y = _root.game.center._y - 0.01;
_root.game.ball3.sfgfg = 1;
_root.ball_ready_to_launch = 1;
} else if (!_root.game.ball4) {
duplicateMovieClip (_root.game.ball, "ball4", 10003);
_root.game.ball4._x = _root.game.center._x - 0.01;
_root.game.ball4._y = _root.game.center._y - 0.01;
_root.game.ball4.sfgfg = 1;
_root.ball_ready_to_launch = 1;
} else if (!_root.game.ball5) {
duplicateMovieClip (_root.game.ball, "ball5", 10004);
_root.game.ball5._x = _root.game.center._x - 0.01;
_root.game.ball5._y = _root.game.center._y - 0.01;
_root.game.ball5.sfgfg = 1;
_root.ball_ready_to_launch = 1;
}
}
}
if (_root.load_slot eq "slot1") {
_root.load_slot = 0;
save_slot1 = SharedObject.getLocal("save_slot1");
if (save_slot1.data.saved eq 1) {
_root.wave = save_slot1.data.wave;
_root.score = save_slot1.data.score;
_root.misses = save_slot1.data.misses;
_root.lvl = save_slot1.data.lvl;
_root.kills_count = save_slot1.data.kills_count;
_root.kills_exp_count = save_slot1.data.kills_exp_count;
_root.skill_points = save_slot1.data.skill_points;
_root.energy_points = save_slot1.data.energy_points;
_root.stability_points = save_slot1.data.stability_points;
_root.projectile_points = save_slot1.data.projectile_points;
_root.shockwave_points = save_slot1.data.shockwave_points;
_root.implosion_points = save_slot1.data.implosion_points;
_root.manipulator_points = save_slot1.data.manipulator_points;
_root.antimatter_points = save_slot1.data.antimatter_points;
}
} else if (_root.load_slot eq "slot2") {
_root.load_slot = 0;
save_slot2 = SharedObject.getLocal("save_slot2");
if (save_slot2.data.saved eq 1) {
_root.wave = save_slot2.data.wave;
_root.score = save_slot2.data.score;
_root.misses = save_slot2.data.misses;
_root.lvl = save_slot2.data.lvl;
_root.kills_count = save_slot2.data.kills_count;
_root.kills_exp_count = save_slot2.data.kills_exp_count;
_root.skill_points = save_slot2.data.skill_points;
_root.energy_points = save_slot2.data.energy_points;
_root.stability_points = save_slot2.data.stability_points;
_root.projectile_points = save_slot2.data.projectile_points;
_root.shockwave_points = save_slot2.data.shockwave_points;
_root.implosion_points = save_slot2.data.implosion_points;
_root.manipulator_points = save_slot2.data.manipulator_points;
_root.antimatter_points = save_slot2.data.antimatter_points;
}
} else if (_root.load_slot eq "slot3") {
_root.load_slot = 0;
save_slot3 = SharedObject.getLocal("save_slot3");
if (save_slot3.data.saved eq 1) {
_root.wave = save_slot3.data.wave;
_root.score = save_slot3.data.score;
_root.misses = save_slot3.data.misses;
_root.lvl = save_slot3.data.lvl;
_root.kills_count = save_slot3.data.kills_count;
_root.kills_exp_count = save_slot3.data.kills_exp_count;
_root.skill_points = save_slot3.data.skill_points;
_root.energy_points = save_slot3.data.energy_points;
_root.stability_points = save_slot3.data.stability_points;
_root.projectile_points = save_slot3.data.projectile_points;
_root.shockwave_points = save_slot3.data.shockwave_points;
_root.implosion_points = save_slot3.data.implosion_points;
_root.manipulator_points = save_slot3.data.manipulator_points;
_root.antimatter_points = save_slot3.data.antimatter_points;
}
}
if (ksgsagsfg != 1) {
ksgsagsfg = 1;
enemy.gotoAndStop(3);
}
if (mammoth_tank_onthefield eq 1) {
mammoth_tank_rr = 0;
}
if (_root.heavy_tank_count > 1) {
heavy_tank_rr = 0;
}
if (random(ord_tank_rr) eq 1) {
Spawn(0);
}
if (random(lazer_tank_rr) eq 1) {
Spawn(1);
}
if (random(hover_tank_rr) eq 1) {
Spawn(2);
}
if (random(mammoth_tank_rr) eq 1) {
Spawn(3);
}
if (random(heavy_tank_rr) eq 1) {
Spawn(4);
}
if (random(railgrav_tank_rr) eq 1) {
Spawn(5);
}
if (random(nuketruck_rr) eq 1) {
Spawn(6);
}
if (random(mech1_rr) eq 1) {
Spawn(7);
}
if (random(black_tank_rr) eq 1) {
Spawn(8);
}
if (random(mech2_rr) eq 1) {
Spawn(9);
}
if (random(sciencevessel_rr) eq 1) {
Spawn(10);
}
if (random(kindabike_rr) eq 1) {
Spawn(11);
}
if (random(kindabike2_rr) eq 1) {
Spawn(12);
}
if (random(mammoth_tank2_rr) eq 1) {
Spawn(13);
}
if (random(clinch_tank_rr) eq 1) {
Spawn(14);
}
if (random(smooth_tank_rr) eq 1) {
Spawn(15);
}
if (_root.projectile_points eq 1) {
_root.ball_type_available_2 = 1;
_root.ball_type_available_1 = 1;
} else if (_root.projectile_points eq 2) {
_root.ball_type_available_1 = 1;
_root.ball_type_available_2 = 1;
_root.ball_type_available_3 = 1;
_root.ball_type_available_4 = 0;
_root.ball_type_available_5 = 0;
_root.ball_type_available_7 = 0;
_root.ball_type_available_8 = 0;
_root.ball_type_available_9 = 0;
} else if (_root.projectile_points eq 3) {
_root.ball_type_available_1 = 1;
_root.ball_type_available_2 = 1;
_root.ball_type_available_3 = 1;
_root.ball_type_available_4 = 0;
_root.ball_type_available_5 = 0;
_root.ball_type_available_7 = 1;
_root.ball_type_available_8 = 0;
_root.ball_type_available_9 = 0;
} else if (_root.projectile_points eq 4) {
_root.ball_type_available_1 = 1;
_root.ball_type_available_2 = 1;
_root.ball_type_available_3 = 1;
_root.ball_type_available_4 = 0;
_root.ball_type_available_5 = 1;
_root.ball_type_available_7 = 1;
_root.ball_type_available_8 = 0;
_root.ball_type_available_9 = 0;
} else if (_root.projectile_points eq 5) {
_root.ball_type_available_1 = 1;
_root.ball_type_available_2 = 1;
_root.ball_type_available_3 = 1;
_root.ball_type_available_4 = 1;
_root.ball_type_available_5 = 1;
_root.ball_type_available_7 = 1;
_root.ball_type_available_8 = 0;
_root.ball_type_available_9 = 0;
} else if (_root.projectile_points eq 6) {
_root.ball_type_available_1 = 1;
_root.ball_type_available_2 = 1;
_root.ball_type_available_3 = 1;
_root.ball_type_available_4 = 1;
_root.ball_type_available_5 = 1;
_root.ball_type_available_7 = 1;
_root.ball_type_available_8 = 0;
_root.ball_type_available_9 = 1;
} else if (_root.projectile_points eq 7) {
_root.ball_type_available_1 = 1;
_root.ball_type_available_2 = 1;
_root.ball_type_available_3 = 1;
_root.ball_type_available_4 = 1;
_root.ball_type_available_5 = 1;
_root.ball_type_available_7 = 1;
_root.ball_type_available_8 = 1;
_root.ball_type_available_9 = 1;
}
_root.implosion_energycost = _root.implosion_energycost_max;
_root.shockwave_energycost = _root.shockwave_energycost_max;
_root.speed_floored = Math.floor(_root.speed * 10) / 10;
if (_root.stability_rating > 0) {
_root.stability_rating_show = Math.floor(_root.stability_rating) + "%";
} else {
_root.stability_rating_show = "0%";
}
if (_root.base_dead != 1) {
_root.energy_show = (Math.floor(_root.energy) + "/") + Math.floor(_root.energy_max);
_root.structure_show = (Math.floor(_root.structure) + "/") + Math.floor(_root.structure_max);
if (_root.energy < _root.energy_max) {
_root.energy = _root.energy + _root.energy_regen;
} else {
_root.energy = _root.energy_max;
}
if (_root.energy < 0) {
_root.energy = 0;
}
if (_root.structure < _root.structure_max) {
_root.structure = _root.structure + (_root.structure_regen * _root.structureup_regen_multiplyer);
} else {
_root.structure = _root.structure_max;
}
if (_root.structure < 0) {
_root.structure = 0;
}
}
_root.lives_show = "Lives: " + (_root.initial_lives - _root.misses);
_root.lvl_show = "Tech Level: " + _root.lvl;
_root.kills_show = "Kills: " + _root.kills_count;
if (_root.game_modo eq 1) {
if (_root.lvl eq 1) {
_root.kills_max = 10;
} else if (_root.lvl eq 2) {
_root.kills_max = 20;
} else if (_root.lvl eq 3) {
_root.kills_max = 30;
} else if (_root.lvl eq 4) {
_root.kills_max = 40;
} else if (_root.lvl eq 5) {
_root.kills_max = 40;
} else if (_root.lvl eq 6) {
_root.kills_max = 80;
} else if (_root.lvl eq 7) {
_root.kills_max = 100;
} else if (_root.lvl eq 8) {
_root.kills_max = 150;
} else if (_root.lvl eq 9) {
_root.kills_max = 150;
} else if (_root.lvl eq 10) {
_root.kills_max = 150;
} else if (_root.lvl eq 11) {
_root.kills_max = 150;
} else if (_root.lvl eq 12) {
_root.kills_max = 150;
} else if (_root.lvl eq 13) {
_root.kills_max = 150;
} else if (_root.lvl eq 14) {
_root.kills_max = 200;
} else if (_root.lvl eq 15) {
_root.kills_max = 200;
} else if (_root.lvl eq 16) {
_root.kills_max = 200;
} else if (_root.lvl eq 17) {
_root.kills_max = 200;
} else if (_root.lvl eq 18) {
_root.kills_max = 200;
} else if (_root.lvl eq 19) {
_root.kills_max = 200;
} else if (_root.lvl eq 20) {
_root.kills_max = 200;
}
} else if (_root.game_modo eq 4) {
if (_root.lvl eq 1) {
_root.kills_max = 10;
} else if (_root.lvl eq 2) {
_root.kills_max = 20;
} else if (_root.lvl eq 3) {
_root.kills_max = 30;
} else if (_root.lvl eq 4) {
_root.kills_max = 40;
} else if (_root.lvl eq 5) {
_root.kills_max = 40;
} else if (_root.lvl eq 6) {
_root.kills_max = 80;
} else if (_root.lvl eq 7) {
_root.kills_max = 100;
} else if (_root.lvl eq 8) {
_root.kills_max = 150;
} else if (_root.lvl eq 9) {
_root.kills_max = 150;
} else if (_root.lvl eq 10) {
_root.kills_max = 150;
} else if (_root.lvl eq 11) {
_root.kills_max = 150;
} else if (_root.lvl eq 12) {
_root.kills_max = 150;
} else if (_root.lvl eq 13) {
_root.kills_max = 150;
} else if (_root.lvl eq 14) {
_root.kills_max = 250;
} else if (_root.lvl eq 15) {
_root.kills_max = 350;
} else if (_root.lvl eq 16) {
_root.kills_max = 500;
} else if (_root.lvl eq 17) {
_root.kills_max = 800;
} else if (_root.lvl eq 18) {
_root.kills_max = 800;
} else if (_root.lvl eq 19) {
_root.kills_max = 800;
} else if (_root.lvl eq 20) {
_root.kills_max = 800;
}
} else if (_root.lvl eq 1) {
_root.kills_max = 10;
} else if (_root.lvl eq 2) {
_root.kills_max = 10;
} else if (_root.lvl eq 3) {
_root.kills_max = 10;
} else if (_root.lvl eq 4) {
_root.kills_max = 20;
} else if (_root.lvl eq 5) {
_root.kills_max = 20;
} else if (_root.lvl eq 6) {
_root.kills_max = 20;
} else if (_root.lvl eq 7) {
_root.kills_max = 30;
} else if (_root.lvl eq 8) {
_root.kills_max = 30;
} else if (_root.lvl eq 9) {
_root.kills_max = 40;
} else if (_root.lvl eq 10) {
_root.kills_max = 70;
} else if (_root.lvl eq 11) {
_root.kills_max = 85;
} else if (_root.lvl eq 12) {
_root.kills_max = 90;
} else if (_root.lvl eq 13) {
_root.kills_max = 100;
} else if (_root.lvl eq 14) {
_root.kills_max = 150;
} else if (_root.lvl eq 15) {
_root.kills_max = 150;
} else if (_root.lvl eq 16) {
_root.kills_max = 150;
} else if (_root.lvl eq 17) {
_root.kills_max = 150;
} else if (_root.lvl eq 18) {
_root.kills_max = 200;
} else if (_root.lvl eq 19) {
_root.kills_max = 200;
} else if (_root.lvl eq 20) {
_root.kills_max = 200;
}
if (_root.kills_exp_count >= _root.kills_max) {
_root.lvl++;
_root.kills_exp_count = 0;
_root.skill_points = _root.skill_points + 5;
}
if (_root.misses > _root.initial_lives) {
_root.base_dead = 1;
}
if (_root.antimatter_time > 0) {
_root.antimatter_time = _root.antimatter_time - 0.0333333333333333;
_root.ball_type = 10;
} else {
_root.antimatter_time = 0;
_root.antimatter_time = 0;
}
if (_root.speedup_time > 0) {
_root.speedup_time = _root.speedup_time - 0.0333333333333333;
_root.ultraspeed_activated = 1;
} else {
_root.speedup_time = 0;
_root.ultraspeed_activated = 0;
}
if (_root.energyup_time > 0) {
_root.energyup_time = _root.energyup_time - 0.0333333333333333;
_root.energy_regen_multiplyer = 5;
} else {
_root.energyup_time = 0;
_root.energy_regen_multiplyer = 1;
}
if (_root.structureup_time > 0) {
_root.structureup_time = _root.structureup_time - 0.0333333333333333;
_root.structureup_regen_multiplyer = 50;
} else {
_root.structureup_time = 0;
_root.structureup_regen_multiplyer = 1;
}
if (_root.nodelay_time > 0) {
_root.nodelay_time = _root.nodelay_time - 0.0333333333333333;
_root.shock_tower_timeout = 0;
_root.tremor_tower_timeout = 0;
_root.shockwave_timeout = 0;
_root.manipulator_timeout = 0;
_root.implosion_timeout = 0;
_root.tier2projectiles_timeout = 0;
} else {
_root.nodelay_time = 0;
}
if (_root.stabilityup_time > 0) {
_root.stabilityup_time = _root.stabilityup_time - 0.0333333333333333;
_root.stabilityup_maxed = 1;
} else {
_root.stabilityup_time = 0;
_root.stabilityup_maxed = 0;
}
gotoAndPlay (1);
if (_root.wave_timer_rough > _root.wave_length) {
_root.stop_all_respawns = 1;
} else if (_root.game_on_hold != 1) {
if (_root.wave eq 1) {
if (_root.wave_timer_rough < 1) {
ord_tank_rr = 5;
_root.max_enemies = 2;
_root.rasstoyanie_mejdu_unitami = 4;
_root.shirina_potoka_mobov = 100;
} else if ((_root.wave_timer_rough > 1) and (_root.wave_timer_rough < 10)) {
_root.max_enemies = 3;
} else if ((_root.wave_timer_rough > 10) and (_root.wave_timer_rough < 20)) {
_root.max_enemies = 4;
} else if (_root.wave_timer_rough > 20) {
_root.max_enemies = 5;
}
} else if (_root.wave eq 2) {
if (_root.wave_timer_rough < 1) {
ord_tank_rr = 5;
_root.max_enemies = 4;
_root.rasstoyanie_mejdu_unitami = 4;
_root.shirina_potoka_mobov = 100;
} else if ((_root.wave_timer_rough > 1) and (_root.wave_timer_rough < 10)) {
_root.max_enemies = 5;
} else if ((_root.wave_timer_rough > 10) and (_root.wave_timer_rough < 20)) {
_root.max_enemies = 6;
} else if (_root.wave_timer_rough > 20) {
_root.max_enemies = 7;
}
} else if (_root.wave eq 3) {
if (_root.wave_timer_rough < 1) {
ord_tank_rr = 5;
_root.max_enemies = 5;
_root.rasstoyanie_mejdu_unitami = 4;
_root.shirina_potoka_mobov = 60;
} else if ((_root.wave_timer_rough > 1) and (_root.wave_timer_rough < 3)) {
ord_tank_rr = 5;
_root.max_enemies = 10;
_root.rasstoyanie_mejdu_unitami = 10;
_root.shirina_potoka_mobov = 120;
} else if ((_root.wave_timer_rough > 3) and (_root.wave_timer_rough < 10)) {
_root.stop_all_respawns = 1;
} else if ((_root.wave_timer_rough > 10) and (_root.wave_timer_rough < 20)) {
ord_tank_rr = 5;
_root.max_enemies = 5;
_root.rasstoyanie_mejdu_unitami = 20;
_root.shirina_potoka_mobov = 170;
} else if (_root.wave_timer_rough > 20) {
ord_tank_rr = 5;
_root.max_enemies = 7;
_root.rasstoyanie_mejdu_unitami = 3;
_root.shirina_potoka_mobov = 10;
}
} else if (_root.wave eq 4) {
if (_root.wave_timer_rough < 1) {
ord_tank_rr = 0;
lazer_tank_rr = 5;
_root.max_enemies = 3;
_root.rasstoyanie_mejdu_unitami = 4;
_root.shirina_potoka_mobov = 60;
} else if ((_root.wave_timer_rough > 1) and (_root.wave_timer_rough < 2)) {
ord_tank_rr = 5;
lazer_tank_rr = 0;
_root.max_enemies = 8;
_root.rasstoyanie_mejdu_unitami = 5;
_root.shirina_potoka_mobov = 120;
} else if ((_root.wave_timer_rough > 2) and (_root.wave_timer_rough < 30)) {
ord_tank_rr = 25;
lazer_tank_rr = 25;
_root.max_enemies = 6;
_root.rasstoyanie_mejdu_unitami = 10;
_root.shirina_potoka_mobov = 170;
} else if ((_root.wave_timer_rough > 30) and (_root.wave_timer_rough < 40)) {
ord_tank_rr = 25;
lazer_tank_rr = 25;
_root.max_enemies = 6;
_root.rasstoyanie_mejdu_unitami = 10;
_root.shirina_potoka_mobov = 30;
} else if (_root.wave_timer_rough > 40) {
ord_tank_rr = 0;
lazer_tank_rr = 5;
_root.max_enemies = 6;
_root.rasstoyanie_mejdu_unitami = 20;
_root.shirina_potoka_mobov = 170;
}
} else if (_root.wave eq 5) {
if (_root.wave_timer_rough < 1) {
ord_tank_rr = 5;
lazer_tank_rr = 0;
railgrav_tank_rr = 5;
kindabike_rr = 5;
kindabike2_rr = 5;
_root.max_enemies = 5;
_root.rasstoyanie_mejdu_unitami = 4;
_root.shirina_potoka_mobov = 80;
} else if ((_root.wave_timer_rough > 1) and (_root.wave_timer_rough < 2)) {
ord_tank_rr = 0;
lazer_tank_rr = 5;
railgrav_tank_rr = 0;
kindabike_rr = 0;
kindabike2_rr = 0;
_root.max_enemies = 10;
_root.rasstoyanie_mejdu_unitami = 7;
_root.shirina_potoka_mobov = 170;
} else if (_root.wave_timer_rough > 2) {
lazer_tank_rr = 15;
ord_tank_rr = 5;
railgrav_tank_rr = 30;
kindabike_rr = 10;
kindabike2_rr = 5;
_root.max_enemies = 6;
_root.rasstoyanie_mejdu_unitami = 7;
_root.shirina_potoka_mobov = 170;
}
} else if (_root.wave eq 6) {
if (_root.wave_timer_rough < 2) {
lazer_tank_rr = 0;
_root.max_enemies = 1;
mammoth_tank2_rr = 5;
_root.rasstoyanie_mejdu_unitami = 4;
_root.shirina_potoka_mobov = 170;
} else if ((_root.wave_timer_rough > 2) and (_root.wave_timer_rough < 999)) {
lazer_tank_rr = 10;
_root.max_enemies = 6;
mammoth_tank2_rr = 0;
}
} else if (_root.wave eq 7) {
if (_root.wave_timer_rough < 1) {
lazer_tank_rr = 0;
black_tank_rr = 5;
_root.max_enemies = 5;
_root.rasstoyanie_mejdu_unitami = 4;
_root.shirina_potoka_mobov = 80;
} else if ((_root.wave_timer_rough > 1) and (_root.wave_timer_rough < 2)) {
lazer_tank_rr = 5;
black_tank_rr = 0;
_root.max_enemies = 10;
_root.rasstoyanie_mejdu_unitami = 15;
_root.shirina_potoka_mobov = 170;
} else if (_root.wave_timer_rough > 2) {
ord_tank_rr = 15;
railgrav_tank_rr = 15;
kindabike_rr = 15;
kindabike2_rr = 15;
lazer_tank_rr = 25;
black_tank_rr = 40;
_root.max_enemies = 6;
}
} else if (_root.wave eq 8) {
if (_root.wave_timer_rough < 5) {
lazer_tank_rr = 0;
black_tank_rr = 5;
_root.max_enemies = 10;
_root.rasstoyanie_mejdu_unitami = 4;
_root.shirina_potoka_mobov = 70;
} else if (_root.wave_timer_rough > 5) {
lazer_tank_rr = 20;
black_tank_rr = 35;
_root.max_enemies = 6;
_root.rasstoyanie_mejdu_unitami = 7;
_root.shirina_potoka_mobov = 170;
}
} else if (_root.wave eq 9) {
if (_root.wave_timer_rough < 3) {
lazer_tank_rr = 5;
black_tank_rr = 5;
mech1_rr = 5;
kindabike2_rr = 5;
_root.max_enemies = 10;
_root.rasstoyanie_mejdu_unitami = 5;
_root.shirina_potoka_mobov = 170;
} else if (_root.wave_timer_rough > 3) {
lazer_tank_rr = 20;
black_tank_rr = 35;
ord_tank_rr = 15;
railgrav_tank_rr = 15;
kindabike_rr = 15;
kindabike2_rr = 15;
_root.max_enemies = 8;
_root.rasstoyanie_mejdu_unitami = 10;
_root.shirina_potoka_mobov = 170;
}
} else if (_root.wave eq 10) {
if (_root.wave_timer_rough < 1.5) {
_root.metod_sortirovki_unitov = 1;
mech1_rr = 0;
kindabike2_rr = 0;
sciencevessel_rr = 5;
_root.max_enemies = 3;
_root.rasstoyanie_mejdu_unitami = 5;
_root.shirina_potoka_mobov = 80;
} else if ((_root.wave_timer_rough > 1.5) and (_root.wave_timer_rough < 2)) {
mech1_rr = 5;
kindabike_rr = 0;
sciencevessel_rr = 0;
_root.max_enemies = 8;
_root.rasstoyanie_mejdu_unitami = 5;
_root.shirina_potoka_mobov = 80;
} else if ((_root.wave_timer_rough > 2) and (_root.wave_timer_rough < 3)) {
mech1_rr = 0;
kindabike_rr = 5;
sciencevessel_rr = 0;
_root.max_enemies = 10;
_root.rasstoyanie_mejdu_unitami = 40;
_root.shirina_potoka_mobov = 170;
} else if ((_root.wave_timer_rough > 3) and (_root.wave_timer_rough < 30)) {
_root.metod_sortirovki_unitov = 2;
mech1_rr = 0;
kindabike_rr = 25;
sciencevessel_rr = 35;
_root.max_enemies = 7;
_root.rasstoyanie_mejdu_unitami = 5;
_root.shirina_potoka_mobov = 170;
} else if (_root.wave_timer_rough > 30) {
_root.metod_sortirovki_unitov = 2;
lazer_tank_rr = 20;
black_tank_rr = 35;
mech1_rr = 30;
ord_tank_rr = 20;
}
} else if (_root.wave eq 11) {
if (_root.wave_timer_rough < 1.5) {
_root.metod_sortirovki_unitov = 1;
mech1_rr = 0;
kindabike2_rr = 0;
sciencevessel_rr = 0;
nuketruck_rr = 3;
_root.max_enemies = 1;
_root.rasstoyanie_mejdu_unitami = 5;
_root.shirina_potoka_mobov = 80;
} else if ((_root.wave_timer_rough > 1.5) and (_root.wave_timer_rough < 2)) {
_root.metod_sortirovki_unitov = 1;
mech1_rr = 0;
kindabike2_rr = 0;
sciencevessel_rr = 3;
nuketruck_rr = 0;
_root.max_enemies = 4;
_root.rasstoyanie_mejdu_unitami = 5;
_root.shirina_potoka_mobov = 80;
} else if ((_root.wave_timer_rough > 3) and (_root.wave_timer_rough < 4)) {
_root.metod_sortirovki_unitov = 1;
mech1_rr = 0;
kindabike2_rr = 0;
sciencevessel_rr = 0;
black_tank_rr = 3;
nuketruck_rr = 0;
_root.max_enemies = 10;
_root.rasstoyanie_mejdu_unitami = 5;
_root.shirina_potoka_mobov = 80;
} else if ((_root.wave_timer_rough > 4) and (_root.wave_timer_rough < 60)) {
_root.metod_sortirovki_unitov = 2;
mech1_rr = 30;
sciencevessel_rr = 30;
black_tank_rr = 30;
nuketruck_rr = 200;
_root.max_enemies = 7;
_root.rasstoyanie_mejdu_unitami = 5;
_root.shirina_potoka_mobov = 80;
}
} else if (_root.wave eq 12) {
if (_root.wave_timer_rough < 1) {
_root.metod_sortirovki_unitov = 1;
mech1_rr = 5;
mech2_rr = 3;
kindabike2_rr = 0;
sciencevessel_rr = 0;
nuketruck_rr = 0;
_root.max_enemies = 10;
_root.rasstoyanie_mejdu_unitami = 5;
_root.shirina_potoka_mobov = 170;
} else if (_root.wave_timer_rough > 1) {
_root.metod_sortirovki_unitov = 2;
mech1_rr = 20;
mech2_rr = 20;
kindabike2_rr = 30;
sciencevessel_rr = 40;
nuketruck_rr = 40;
_root.max_enemies = 8;
_root.rasstoyanie_mejdu_unitami = 5;
_root.shirina_potoka_mobov = 170;
}
} else if (_root.wave eq 13) {
if (_root.wave_timer_rough < 1) {
_root.metod_sortirovki_unitov = 1;
mech1_rr = 7;
mech2_rr = 5;
kindabike2_rr = 0;
sciencevessel_rr = 0;
nuketruck_rr = 0;
_root.max_enemies = 10;
_root.rasstoyanie_mejdu_unitami = 6;
_root.shirina_potoka_mobov = 170;
} else if (_root.wave_timer_rough > 1) {
_root.metod_sortirovki_unitov = 2;
mech1_rr = 20;
mech2_rr = 20;
nuketruck_rr = 20;
_root.max_enemies = 9;
}
} else if (_root.wave eq 14) {
if (_root.wave_timer_rough < 1) {
_root.metod_sortirovki_unitov = 1;
mech1_rr = 0;
mech2_rr = 0;
kindabike_rr = 7;
sciencevessel_rr = 5;
nuketruck_rr = 0;
_root.max_enemies = 10;
_root.rasstoyanie_mejdu_unitami = 6;
_root.shirina_potoka_mobov = 170;
} else if (_root.wave_timer_rough > 1) {
_root.metod_sortirovki_unitov = 2;
mech1_rr = 20;
mech2_rr = 20;
sciencevessel_rr = 20;
kindabike_rr = 20;
nuketruck_rr = 10;
_root.max_enemies = 9;
}
} else if (_root.wave eq 15) {
if (_root.wave_timer_rough < 900) {
_root.metod_sortirovki_unitov = 2;
_root.max_enemies = 10;
_root.rasstoyanie_mejdu_unitami = 6;
_root.shirina_potoka_mobov = 170;
if (_root.enemies_onthefield eq 0) {
scenario_trigger_1 = 1;
}
if (scenario_trigger_1 eq 0) {
_root.stop_all_respawns = 1;
}
if ((scenario_trigger_1 eq 1) and (_root.enemies_onthefield < _root.max_enemies)) {
if (_root.wave_timer_rough < 30) {
mech1_rr = 10;
ord_tank_rr = 10;
kindabike_rr = 10;
kindabike2_rr = 10;
hover_tank_rr = 10;
railgrav_tank_rr = 10;
} else if ((_root.wave_timer_rough > 30) and (_root.wave_timer_rough < 70)) {
mech1_rr = 0;
ord_tank_rr = 0;
kindabike_rr = 0;
kindabike2_rr = 0;
hover_tank_rr = 0;
railgrav_tank_rr = 0;
nuketruck_rr = 0;
black_tank_rr = 10;
mech2_rr = 10;
sciencevessel_rr = 10;
} else if (_root.wave_timer_rough > 70) {
mech1_rr = 0;
ord_tank_rr = 0;
kindabike_rr = 0;
kindabike2_rr = 0;
hover_tank_rr = 0;
railgrav_tank_rr = 0;
nuketruck_rr = 15;
black_tank_rr = 0;
mech2_rr = 0;
sciencevessel_rr = 10;
}
}
if (_root.enemies_onthefield eq _root.max_enemies) {
scenario_trigger_1 = 0;
}
}
} else if (_root.wave eq 16) {
if (_root.wave_timer_rough < 2) {
_root.metod_sortirovki_unitov = 1;
mech1_rr = 0;
mech2_rr = 0;
kindabike_rr = 0;
sciencevessel_rr = 0;
nuketruck_rr = 0;
mammoth_tank_rr = 3;
_root.max_enemies = 1;
_root.rasstoyanie_mejdu_unitami = 6;
_root.shirina_potoka_mobov = 170;
} else if ((_root.wave_timer_rough > 2) and (_root.wave_timer_rough < 3.5)) {
kindabike_rr = 5;
_root.max_enemies = 10;
mammoth_tank_rr = 0;
} else if (_root.wave_timer_rough > 3.5) {
kindabike_rr = 0;
_root.metod_sortirovki_unitov = 2;
mammoth_tank_rr = 30;
mech2_rr = 20;
sciencevessel_rr = 20;
nuketruck_rr = 70;
}
} else if (_root.wave eq 17) {
if (_root.wave_timer_rough < 2) {
_root.metod_sortirovki_unitov = 1;
mech1_rr = 0;
mech2_rr = 0;
kindabike_rr = 0;
sciencevessel_rr = 0;
nuketruck_rr = 0;
mammoth_tank_rr = 3;
_root.max_enemies = 1;
_root.rasstoyanie_mejdu_unitami = 6;
_root.shirina_potoka_mobov = 170;
} else if ((_root.wave_timer_rough > 2) and (_root.wave_timer_rough < 3.5)) {
mech1_rr = 5;
_root.max_enemies = 10;
mammoth_tank_rr = 0;
} else if (_root.wave_timer_rough > 3.5) {
kindabike_rr = 0;
_root.metod_sortirovki_unitov = 2;
mammoth_tank_rr = 30;
mech2_rr = 20;
mech1_rr = 40;
sciencevessel_rr = 20;
nuketruck_rr = 70;
kindabike_rr = 40;
black_tank_rr = 40;
lazer_tank_rr = 40;
}
} else if (_root.wave eq 18) {
if (_root.wave_timer_rough < 5) {
_root.metod_sortirovki_unitov = 2;
mammoth_tank2_rr = 10;
_root.max_enemies = 2;
_root.rasstoyanie_mejdu_unitami = 10;
_root.shirina_potoka_mobov = 170;
} else if (_root.wave_timer_rough > 5) {
_root.max_enemies = 10;
_root.rasstoyanie_mejdu_unitami = 10;
_root.metod_sortirovki_unitov = 2;
mammoth_tank_rr = 60;
mammoth_tank2_rr = 0;
kindabike_rr = 60;
ord_tank_rr = 60;
lazer_tank_rr = 60;
hover_tank_rr = 60;
heavy_tank_rr = 0;
railgrav_tank_rr = 60;
nuketruck_rr = 60;
black_tank_rr = 60;
mech2_rr = 60;
mech1_rr = 60;
kindabike2_rr = 60;
sciencevessel_rr = 60;
}
} else if (_root.wave eq 19) {
if (_root.wave_timer_rough < 2) {
_root.metod_sortirovki_unitov = 1;
heavy_tank_rr = 5;
_root.max_enemies = 10;
_root.rasstoyanie_mejdu_unitami = 10;
_root.shirina_potoka_mobov = 170;
} else if ((_root.wave_timer_rough > 2) and (_root.wave_timer_rough < 3)) {
_root.metod_sortirovki_unitov = 1;
black_tank_rr = 6;
} else if (_root.wave_timer_rough > 3) {
_root.metod_sortirovki_unitov = 2;
mammoth_tank_rr = 60;
mammoth_tank2_rr = 0;
kindabike_rr = 60;
ord_tank_rr = 60;
lazer_tank_rr = 60;
hover_tank_rr = 60;
heavy_tank_rr = 30;
railgrav_tank_rr = 60;
nuketruck_rr = 60;
black_tank_rr = 60;
mech2_rr = 60;
mech1_rr = 60;
kindabike2_rr = 60;
sciencevessel_rr = 60;
}
} else if (_root.wave eq 20) {
if (_root.wave_timer_rough < 900) {
_root.metod_sortirovki_unitov = 2;
_root.max_enemies = 10;
_root.rasstoyanie_mejdu_unitami = 6;
_root.shirina_potoka_mobov = 170;
if (_root.enemies_onthefield < (_root.max_enemies / 2)) {
scenario_trigger_1 = 1;
}
if (scenario_trigger_1 eq 0) {
_root.stop_all_respawns = 1;
}
if ((scenario_trigger_1 eq 1) and (_root.enemies_onthefield < _root.max_enemies)) {
mammoth_tank_rr = 90;
mammoth_tank2_rr = 90;
kindabike_rr = 0;
ord_tank_rr = 0;
lazer_tank_rr = 60;
hover_tank_rr = 0;
heavy_tank_rr = 60;
railgrav_tank_rr = 0;
nuketruck_rr = 80;
black_tank_rr = 60;
mech2_rr = 60;
mech1_rr = 0;
kindabike2_rr = 0;
sciencevessel_rr = 60;
}
if (_root.enemies_onthefield eq _root.max_enemies) {
scenario_trigger_1 = 0;
}
}
} else if (_root.wave eq 21) {
_root.powerup_respawn_rate = 10;
if (_root.wave_timer_rough < 900) {
_root.metod_sortirovki_unitov = 2;
_root.max_enemies = 10;
_root.rasstoyanie_mejdu_unitami = 8;
_root.shirina_potoka_mobov = 170;
mammoth_tank_rr = 40;
mammoth_tank2_rr = 40;
kindabike_rr = 50;
ord_tank_rr = 0;
lazer_tank_rr = 90;
hover_tank_rr = 0;
heavy_tank_rr = 30;
railgrav_tank_rr = 0;
nuketruck_rr = 60;
black_tank_rr = 60;
mech2_rr = 60;
mech1_rr = 0;
kindabike2_rr = 60;
sciencevessel_rr = 60;
}
} else if (_root.wave eq 22) {
_root.powerup_respawn_rate = 10;
if (_root.wave_timer_rough < 900) {
_root.extreme_mode_activated = 1;
_root.metod_sortirovki_unitov = 2;
_root.max_enemies = 10;
_root.rasstoyanie_mejdu_unitami = 8;
_root.shirina_potoka_mobov = 170;
mammoth_tank_rr = 40;
mammoth_tank2_rr = 40;
kindabike_rr = 50;
ord_tank_rr = 50;
lazer_tank_rr = 90;
hover_tank_rr = 0;
heavy_tank_rr = 30;
railgrav_tank_rr = 0;
nuketruck_rr = 60;
black_tank_rr = 60;
mech2_rr = 60;
mech1_rr = 70;
kindabike2_rr = 60;
sciencevessel_rr = 60;
}
}
}
if (_root.game_on_hold != 1) {
if ((_root.game_modo eq 2) or (_root.game_modo eq 3)) {
if (_root.wave_timer_rough > 300) {
_root.extreme_mode_activated = 1;
}
if (_root.wave eq 1) {
if (_root.wave_timer_rough < 120) {
_root.metod_sortirovki_unitov = 2;
_root.max_enemies = 10;
_root.rasstoyanie_mejdu_unitami = 5;
_root.shirina_potoka_mobov = 170;
if (_root.enemies_onthefield < 4) {
scenario_trigger_1 = 1;
}
if (scenario_trigger_1 eq 0) {
_root.stop_all_respawns = 1;
}
if ((scenario_trigger_1 eq 1) and (_root.enemies_onthefield < _root.max_enemies)) {
if (_root.wave_timer_rough < 40) {
mammoth_tank_rr = 0;
mammoth_tank2_rr = 0;
kindabike_rr = 20;
ord_tank_rr = 20;
lazer_tank_rr = 20;
hover_tank_rr = 30;
heavy_tank_rr = 0;
railgrav_tank_rr = 20;
nuketruck_rr = 0;
black_tank_rr = 0;
mech2_rr = 0;
mech1_rr = 20;
kindabike2_rr = 20;
sciencevessel_rr = 0;
} else if ((_root.wave_timer_rough > 40) and (_root.wave_timer_rough < 60)) {
lazer_tank_rr = 20;
} else if ((_root.wave_timer_rough > 60) and (_root.wave_timer_rough < 80)) {
black_tank_rr = 20;
} else if ((_root.wave_timer_rough > 80) and (_root.wave_timer_rough < 100)) {
heavy_tank_rr = 20;
mech2_rr = 20;
} else if ((_root.wave_timer_rough > 100) and (_root.wave_timer_rough < 120)) {
nuketruck_rr = 20;
mammoth_tank_rr = 10;
}
}
if (_root.enemies_onthefield eq _root.max_enemies) {
scenario_trigger_1 = 0;
}
} else if ((_root.wave_timer_rough > 120) and (_root.wave_timer_rough < 180)) {
_root.metod_sortirovki_unitov = 1;
_root.max_enemies = 10;
_root.rasstoyanie_mejdu_unitami = 5;
_root.shirina_potoka_mobov = 90;
heavy_tank_rr = 20;
nuketruck_rr = 70;
black_tank_rr = 20;
sciencevessel_rr = 20;
} else if ((_root.wave_timer_rough > 180) and (_root.wave_timer_rough < 210)) {
_root.metod_sortirovki_unitov = 2;
_root.max_enemies = 10;
_root.rasstoyanie_mejdu_unitami = 10;
_root.shirina_potoka_mobov = 170;
heavy_tank_rr = 20;
nuketruck_rr = 70;
black_tank_rr = 20;
sciencevessel_rr = 20;
} else if (_root.wave_timer_rough > 210) {
if (_root.survival_trigger_1 != 1) {
_root.metod_sortirovki_unitov = 2;
_root.max_enemies = 10;
_root.rasstoyanie_mejdu_unitami = 6;
_root.shirina_potoka_mobov = 170;
mammoth_tank_rr = 20;
mammoth_tank2_rr = 20;
kindabike_rr = 20;
ord_tank_rr = 20;
lazer_tank_rr = 20;
hover_tank_rr = 20;
heavy_tank_rr = 20;
railgrav_tank_rr = 20;
nuketruck_rr = 20;
black_tank_rr = 20;
mech2_rr = 20;
mech1_rr = 20;
kindabike2_rr = 20;
sciencevessel_rr = 20;
} else {
_root.stop_all_respawns = 1;
}
_root.survival_timer_1 = _root.survival_timer_1 + 0.032258064516129;
if (_root.survival_timer_1 > _root.stoptime) {
_root.survival_trigger_1 = 1;
_root.survival_timer_2 = _root.survival_timer_2 + 0.032258064516129;
if (_root.survival_timer_2 > 10) {
_root.survival_timer_2 = 0;
_root.survival_timer_1 = 0;
_root.survival_trigger_1 = 0;
_root.stoptime = _root.stoptime + 20;
}
}
}
}
}
}
if (_root.game_modo eq 4) {
}
if (_root.game_on_hold != 1) {
if (_root.game_modo eq 4) {
_root.dla_skolkih_unitov_funkcii = 12;
_root.max_enemies = 12;
if (_root.wave_timer_rough > 200) {
_root.extreme_mode_activated = 1;
}
if (_root.survival_trigger_1 != 1) {
_root.metod_sortirovki_unitov = 1;
_root.rasstoyanie_mejdu_unitami = 10;
_root.shirina_potoka_mobov = 120;
lazer_tank_rr = 20;
sciencevessel_rr = 20;
clinch_tank_rr = 20;
}
}
}
Symbol 506 Button
on (release) {
duplicateMovieClip ("_root.game.singularity2_source", "singularityblow1", 10500);
_root.game.singularityblow1.go = 1;
_root.game.singularityblow1._x = 7;
_root.game.singularityblow1._y = 2;
}
Symbol 509 MovieClip Frame 125
stop();
Instance of Symbol 508 MovieClip in Symbol 509 MovieClip Frame 125
onClipEvent (enterFrame) {
if (_root.game.singularityblow1) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 513 MovieClip in Symbol 518 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 519 MovieClip Frame 2
if (play_ eq 1) {
gotoAndPlay (3);
} else {
gotoAndPlay (1);
}
Instance of Symbol 518 MovieClip in Symbol 519 MovieClip Frame 3
onClipEvent (enterFrame) {
if (_root.global_quality eq 1) {
gotoAndStop (2);
} else if (_root.global_quality eq 2) {
gotoAndStop (3);
} else if (_root.global_quality eq 3) {
gotoAndStop (4);
} else if (_root.global_quality eq 4) {
gotoAndStop (5);
}
}
Symbol 519 MovieClip Frame 4
if (play_ eq 1) {
gotoAndPlay (3);
} else {
gotoAndPlay (1);
}
Symbol 521 Button
on (press, keyPress "Q") {
gotoAndPlay (2);
if (_root.global_quality < 4) {
_root.global_quality = _root.global_quality + 1;
} else if (_root.global_quality eq 4) {
_root.global_quality = 1;
}
}
on (keyPress "q") {
gotoAndPlay (2);
if (_root.global_quality < 4) {
_root.global_quality = _root.global_quality + 1;
} else if (_root.global_quality eq 4) {
_root.global_quality = 1;
}
}
Symbol 522 MovieClip Frame 1
stop();
Symbol 522 MovieClip Frame 2
_root.show_quality.play_ = 1;
Symbol 522 MovieClip Frame 35
_root.show_quality.play_ = 0;
Symbol 534 MovieClip Frame 1
stop();
Symbol 540 MovieClip Frame 1
stop();