Frame 1
duplicateMovieClip ("title_end_source", "title_end", "227");
setProperty("title_end_source", _visible , "0");
tellTarget ("title_end") {
gotoAndStop ("title");
};
stop();
Frame 3
duplicateMovieClip ("tank_1_source", "tank_1", "223");
setProperty("tank_1_source", _visible , "0");
duplicateMovieClip ("tank_2_source", "tank_2", "224");
setProperty("tank_2_source", _visible , "0");
duplicateMovieClip ("explosion_source", "explosion", "225");
setProperty("explosion_source", _visible , "0");
tellTarget ("tank_2/body_color") {
gotoAndStop ("blue");
tellTarget ("tank_2/cannon_color") {
gotoAndStop ("blue");
tellTarget ("tank_2/tread_color") {
gotoAndStop ("blue");
};
count = "1";
height = random("101") + "160";
setProperty("ground_0", _y , height);
setProperty("ground_0", _yscale , ("361" - height) / "3");
if (cpu eq "true") {
Set("cpu:aim_refine", "1");
Set("cpu:old_tank_x", getProperty("tank_1", _x));
Set("cpu:aim_refined", "false");
Set("cpu:old_armor", "100");
Set("cpu:retreat_count", "25");
Set("cpu:retreated", "false");
Set("cpu:angle_reset", "false");
Set("cpu:angle_detected", "false");
Set("cpu:lowest_hypotenuse", "250000");
Set("cpu:best_angle", "90");
Set("cpu:angle_count", "90");
}
}
}
Frame 4
height = (height + random("101")) - "50";
if (height < "60") {
height = "60";
} else if ("320" < height) {
height = "320";
}
slope = random("16") + "15";
slope_count = slope;
Frame 5
if (count < "221") {
duplicateMovieClip ("ground_0", "ground_" add count, count);
setProperty("ground_" add count, _x , getProperty("ground_" add (count - "1"), _x) + "4");
setProperty("ground_" add count, _y , getProperty("ground_" add (count - "1"), _y) + ((height - getProperty("ground_" add (count - "1"), _y)) / slope));
setProperty("ground_" add count, _yscale , ("361" - getProperty("ground_" add count, _y)) / "3");
slope_count = slope_count - "1";
if (slope_count == "0") {
gotoAndPlay (4);
}
count = count + "1";
} else {
gotoAndPlay (7);
}
Frame 6
gotoAndPlay (5);
Frame 7
Set("tank_1:number", "1");
Set("tank_2:number", "2");
Set("tank_1:cannon_rotation_modifier", "0");
Set("tank_2:cannon_rotation_modifier", "180");
Set("tank_1:ground", random("41") + "20");
Set("tank_2:ground", random("41") + "160");
cannon_1_rotation = "";
cannon_2_rotation = "";
tellTarget ("tank_1") {
gotoAndPlay ("tank_location");
tellTarget ("tank_2") {
gotoAndPlay ("tank_location");
tellTarget ("uncover") {
gotoAndPlay ("check_tanks");
};
turn_1_modifier = "1";
turn_2_modifier = -"1";
gotoAndStop("cover:turn_" add turn);
wind = random("61") - "30";
if ("0" < wind) {
wind_text = wind add "E";
tellTarget ("east_wind_strength") {
gotoAndStop ("wind");
tellTarget ("east_arrow") {
gotoAndStop ("wind");
};
setProperty("east_wind_strength", _xscale , int(wind * ("100" / "30")));
setProperty("east_arrow", _x , "460" + getProperty("east_wind_strength", _width));
}
} else if (wind < "0") {
wind_text = (-wind) add "W";
tellTarget ("west_wind_strength") {
gotoAndStop ("wind");
tellTarget ("west_arrow") {
gotoAndStop ("wind");
};
setProperty("west_wind_strength", _xscale , int((-wind) * ("100" / "30")));
setProperty("west_arrow", _x , "420" - getProperty("west_wind_strength", _width));
}
} else {
wind_text = wind;
}
Set("clouds_1:speed_modifier", "1.3");
Set("clouds_2:speed_modifier", "1");
tellTarget ("clouds_1") {
gotoAndPlay ("location");
tellTarget ("clouds_2") {
gotoAndPlay ("location");
};
armor_1 = "100";
armor_2 = "100";
velocity_1 = "50";
velocity_2 = "50";
}
}
}
Frame 8
stop();
Frame 9
tellTarget ("title_end") {
gotoAndStop ("end");
};
stop();
Symbol 8 MovieClip Frame 1
stop();
Symbol 8 MovieClip Frame 2
stop();
Symbol 8 MovieClip Frame 3
stop();
Symbol 8 MovieClip Frame 4
stop();
Symbol 8 MovieClip Frame 5
stop();
Symbol 8 MovieClip Frame 6
stop();
Symbol 9 MovieClip Frame 1
stop();
Symbol 9 MovieClip Frame 2
if ((already_played ne "true") or (reset eq "true")) {
if ("0" < ..:wind) {
_x = (-"150");
gotoAndPlay (3);
} else if (..:wind < "0") {
_x = "1030";
gotoAndPlay (3);
} else {
_x = (random("581") + "150");
gotoAndStop (11);
}
_y = (random("191") + "10");
gotoAndStop("clouds:" add (random("6") + "1"));
reset = "false";
}
Symbol 9 MovieClip Frame 3
cloud_x = _x;
_x = (cloud_x + ((..:wind / "10") * speed_modifier));
if (("1030" < cloud_x) or (cloud_x < (-"150"))) {
reset = "true";
gotoAndPlay (2);
}
Symbol 9 MovieClip Frame 10
gotoAndPlay (3);
Symbol 9 MovieClip Frame 11
stop();
Symbol 11 MovieClip Frame 1
stop();
Symbol 11 MovieClip Frame 2
ground_x = _x;
ground_y = _y;
if ((((((ground_x - ../explosion:explosion_x) * (ground_x - ../explosion:explosion_x)) + ((ground_y - ../explosion:explosion_y) * (ground_y - ../explosion:explosion_y))) < (../explosion:distance * ../explosion:distance)) or ((((-../explosion:distance) < (ground_x - ../explosion:explosion_x)) and ((ground_x - ../explosion:explosion_x) < ../explosion:distance)) and (ground_y < ../explosion:explosion_y))) and ("360" >= ground_y)) {
_y = (ground_y + "1");
_yscale = (("361" - _y) / "3");
} else {
Set("../explosion:ground_deforming", ../explosion:ground_deforming - "1");
gotoAndStop (1);
}
Symbol 11 MovieClip Frame 3
gotoAndPlay (2);
Symbol 22 Button
on (release) {
gotoAndStop (3);
}
Symbol 31 Button
on (release) {
gotoAndStop (6);
}
Symbol 40 Button
on (release) {
gotoAndStop (7);
}
Symbol 42 Button
on (release) {
Set("..:turn", "1");
Set("..:cpu", "true");
Set("..:old_cpu", "true");
gotoAndStop (4);
}
Symbol 44 Button
on (release) {
Set("..:cpu", "false");
Set("..:old_cpu", "false");
gotoAndStop (5);
}
Symbol 49 Button
on (release) {
Set("..:difficulty_level", "10");
tellTarget ("../") {
gotoAndPlay ("start");
};
gotoAndStop (1);
}
Symbol 50 Button
on (release) {
Set("..:difficulty_level", "25");
tellTarget ("../") {
gotoAndPlay ("start");
};
gotoAndStop (1);
}
Symbol 51 Button
on (release) {
Set("..:difficulty_level", "40");
tellTarget ("../") {
gotoAndPlay ("start");
};
gotoAndStop (1);
}
Symbol 53 Button
on (release) {
Set("..:turn", "1");
tellTarget ("../") {
gotoAndPlay ("start");
};
gotoAndStop (1);
}
Symbol 54 Button
on (release) {
Set("..:turn", "2");
tellTarget ("../") {
gotoAndPlay ("start");
};
gotoAndStop (1);
}
Symbol 55 Button
on (release) {
Set("..:turn", random("2"));
if (..:turn == "0") {
Set("..:turn", "2");
}
tellTarget ("../") {
gotoAndPlay ("start");
};
gotoAndStop (1);
}
Symbol 58 Button
on (release) {
gotoAndStop (2);
}
Symbol 75 Button
on (release) {
Set("..:cpu", ..:old_cpu);
tellTarget ("../") {
gotoAndPlay ("start");
};
gotoAndStop (1);
}
Symbol 76 Button
on (release) {
removeMovieClip("../tank_1");
removeMovieClip("../tank_2");
tellTarget ("../") {
gotoAndStop ("title");
}
}
Symbol 85 MovieClip Frame 1
stop();
Symbol 85 MovieClip Frame 2
stop();
Symbol 85 MovieClip Frame 3
stop();
Symbol 85 MovieClip Frame 4
stop();
Symbol 85 MovieClip Frame 5
stop();
Symbol 85 MovieClip Frame 6
stop();
Symbol 85 MovieClip Frame 7
stop();
Symbol 85 MovieClip Frame 8
stop();
Symbol 88 MovieClip Frame 1
stop();
Symbol 88 MovieClip Frame 2
stop();
Symbol 90 MovieClip Frame 1
stop();
Symbol 90 MovieClip Frame 2
stop();
Symbol 101 MovieClip Frame 1
stop();
Symbol 101 MovieClip Frame 2
stop();
Symbol 110 MovieClip Frame 1
stop();
Symbol 112 MovieClip Frame 1
stop();
Symbol 112 MovieClip Frame 2
stop();
Symbol 116 MovieClip Frame 1
stop();
Symbol 116 MovieClip Frame 2
stop();
Symbol 119 MovieClip Frame 1
stop();
Symbol 119 MovieClip Frame 2
_x = getProperty("../ground_" add ground, _x);
ground_m2 = getProperty("../ground_" add (ground - "2"), _y);
ground_p2 = getProperty("../ground_" add (ground + "2"), _y);
tank_dropped = "false";
tank_risen = "false";
line_rotation = "0";
setProperty("../rotation_check_" add number, _rotation , line_rotation);
tank_rotated = "false";
Symbol 119 MovieClip Frame 3
tank_y = _y;
if ((tank_y < ((ground_m2 + ground_p2) / "2")) and (tank_y < "361")) {
_y = (tank_y + "1");
} else {
tank_dropped = "true";
}
if (tank_dropped eq "true") {
gotoAndPlay (5);
}
Symbol 119 MovieClip Frame 4
gotoAndPlay (3);
Symbol 119 MovieClip Frame 5
tank_y = _y;
if (((ground_m2 + ground_p2) / "2") < tank_y) {
_y = (tank_y - "1");
} else {
tank_risen = "true";
}
if (tank_risen eq "true") {
if (ground_m2 < ground_p2) {
rotation_direction = "1";
ground_height = ground_p2 - ground_m2;
} else {
rotation_direction = -"1";
ground_height = ground_m2 - ground_p2;
}
gotoAndPlay (7);
}
Symbol 119 MovieClip Frame 6
gotoAndPlay (5);
Symbol 119 MovieClip Frame 7
while ((ground_height >= getProperty("../rotation_check_" add number, _height)) and (getProperty("../rotation_check_" add number, _height) < "10")) {
line_rotation = line_rotation + rotation_direction;
setProperty("../rotation_check_" add number, _rotation , line_rotation);
}
Symbol 119 MovieClip Frame 8
if (tank_rotation < line_rotation) {
tank_rotation = tank_rotation + "1";
} else if (line_rotation < tank_rotation) {
tank_rotation = tank_rotation - "1";
} else {
tank_rotated = "true";
}
_rotation = tank_rotation;
if ((("0" + cannon_rotation_modifier) >= (eval (("..:cannon_" add number) add "_rotation") - tank_rotation)) and ((eval (("..:cannon_" add number) add "_rotation") - tank_rotation) >= ((-"180") + cannon_rotation_modifier))) {
cannon_rotation = eval (("..:cannon_" add number) add "_rotation") - tank_rotation;
}
if ((eval (("..:cannon_" add number) add "_rotation") - tank_rotation) <> cannon_rotation) {
Set(("..:cannon_" add number) add "_rotation", cannon_rotation + tank_rotation);
}
setProperty("cannon_color", _rotation , cannon_rotation);
if (tank_rotated eq "true") {
gotoAndPlay (10);
}
Symbol 119 MovieClip Frame 9
gotoAndPlay (8);
Symbol 119 MovieClip Frame 10
setProperty("../cannon_height_line", _x , getProperty("../tank_" add ..:turn, _x));
setProperty("../cannon_height_line", _y , getProperty("../tank_" add ..:turn, _y));
setProperty("../cannon_height_line", _rotation , tank_rotation - "90");
if (tank_rotation < "0") {
setProperty("../cannon_angle_line", _x , getProperty("../cannon_height_line", _x) - getProperty("../cannon_height_line", _width));
} else {
setProperty("../cannon_angle_line", _x , getProperty("../cannon_height_line", _x) + getProperty("../cannon_height_line", _width));
}
setProperty("../cannon_angle_line", _y , getProperty("../cannon_height_line", _y) - getProperty("../cannon_height_line", _height));
setProperty("../cannon_angle_line", _rotation , (cannon_rotation + tank_rotation) + cannon_rotation_modifier);
if (../explosion:exploding ne "true") {
if (((cannon_rotation + tank_rotation) - cannon_rotation_modifier) < (-"90")) {
setProperty("../explosion", _x , getProperty("../cannon_angle_line", _x) - getProperty("../cannon_angle_line", _width));
} else {
setProperty("../explosion", _x , getProperty("../cannon_angle_line", _x) + getProperty("../cannon_angle_line", _width));
}
if ((((cannon_rotation + tank_rotation) - cannon_rotation_modifier) < "0") and ((-"180") < ((cannon_rotation + tank_rotation) - cannon_rotation_modifier))) {
setProperty("../explosion", _y , getProperty("../cannon_angle_line", _y) - getProperty("../cannon_angle_line", _height));
} else {
setProperty("../explosion", _y , getProperty("../cannon_angle_line", _y) + getProperty("../cannon_angle_line", _height));
}
}
setProperty(("../cannon_" add ..:turn) add "_velocity", _rotation , (cannon_rotation + tank_rotation) + cannon_rotation_modifier);
if ((../tank_1:once_through eq "true") and (../tank_2:once_through eq "true")) {
if (((..:turn == "2") and (number == "2")) and (..:cpu eq "true")) {
setProperty("../cpu", _x , getProperty("../explosion", _x));
setProperty("../cpu", _y , getProperty("../explosion", _y));
tellTarget ("../cpu") {
gotoAndPlay ("velocity");
};
} else {
tellTarget ("../control") {
gotoAndStop ("control");
};
}
if (killed eq "true") {
killed = "false";
gotoAndPlay (12);
}
}
setProperty(("../cannon_" add number) add "_velocity", _xscale , eval ("..:velocity_" add number));
Set("..:angle_" add number, ((-eval (("..:cannon_" add number) add "_rotation")) * eval (("..:turn_" add number) add "_modifier")) add "°");
Set(("..:velocity_" add number) add "_text", eval ("..:velocity_" add number) add " MPS");
Set(("..:armor_" add number) add "_text", eval ("..:armor_" add number) add "%");
if (once_through ne "true") {
once_through = "true";
tellTarget ("../tank_" add ..:turn) {
gotoAndPlay ("tank_drop");
};
}
Symbol 119 MovieClip Frame 11
stop();
Symbol 119 MovieClip Frame 12
setProperty("cannon_explode_velocity", _xscale , random("31") + "30");
setProperty("body_explode_velocity", _xscale , random("31") + "30");
setProperty("tread_explode_velocity", _xscale , random("31") + "30");
cannon_explode_rotation = random("91") - "135";
body_explode_rotation = random("91") - "135";
tread_explode_rotation = random("91") - "135";
setProperty("cannon_explode_velocity", _rotation , cannon_explode_rotation);
setProperty("body_explode_velocity", _rotation , body_explode_rotation);
setProperty("tread_explode_velocity", _rotation , tread_explode_rotation);
cannon_explode_velocity_width = getProperty("cannon_explode_velocity", _width) / "30";
cannon_explode_velocity_height = getProperty("cannon_explode_velocity", _height) / "30";
body_explode_velocity_width = getProperty("body_explode_velocity", _width) / "30";
body_explode_velocity_height = getProperty("body_explode_velocity", _height) / "30";
tread_explode_velocity_width = getProperty("tread_explode_velocity", _width) / "30";
tread_explode_velocity_height = getProperty("tread_explode_velocity", _height) / "30";
if (cannon_explode_rotation >= (-"90")) {
cannon_explode_modifier = random("8") + "1";
} else {
cannon_explode_modifier = -(random("8") + "1");
}
if (body_explode_rotation >= (-"90")) {
body_explode_modifier = random("8") + "1";
} else {
body_explode_modifier = -(random("8") + "1");
}
if (tread_explode_rotation >= (-"90")) {
tread_explode_modifier = random("8") + "1";
} else {
tread_explode_modifier = -(random("8") + "1");
}
setProperty("../explosion", _x , _x);
setProperty("../explosion", _y , _y);
tellTarget ("../explosion") {
gotoAndPlay ("tank_explosion_start");
}
Symbol 119 MovieClip Frame 34
if (_rotation <> "0") {
_rotation = "0";
}
Symbol 119 MovieClip Frame 35
cannon_explode_velocity_height = cannon_explode_velocity_height - "0.02";
body_explode_velocity_height = body_explode_velocity_height - "0.02";
tread_explode_velocity_height = tread_explode_velocity_height - "0.02";
cannon_explode_rotation = cannon_explode_rotation + cannon_explode_modifier;
body_explode_rotation = body_explode_rotation + body_explode_modifier;
tread_explode_rotation = tread_explode_rotation + tread_explode_modifier;
cannon_x = getProperty("cannon_color", _x);
cannon_y = getProperty("cannon_color", _y);
body_x = getProperty("body_color", _x);
body_y = getProperty("body_color", _y);
tread_x = getProperty("tread_color", _x);
tread_y = getProperty("tread_color", _y);
setProperty("cannon_color", _x , cannon_x + (cannon_explode_velocity_width * cannon_explode_modifier));
setProperty("cannon_color", _y , cannon_y - cannon_explode_velocity_height);
setProperty("body_color", _x , body_x + (body_explode_velocity_width * body_explode_modifier));
setProperty("body_color", _y , body_y - body_explode_velocity_height);
setProperty("tread_color", _x , tread_x + (tread_explode_velocity_width * tread_explode_modifier));
setProperty("tread_color", _y , tread_y - tread_explode_velocity_height);
setProperty("cannon_color", _rotation , cannon_explode_rotation);
setProperty("body_color", _rotation , body_explode_rotation);
setProperty("tread_color", _rotation , tread_explode_rotation);
if (((("460" - tank_y) < cannon_y) and (("460" - tank_y) < body_y)) and (("460" - tank_y) < body_y)) {
gotoAndStop (37);
}
Symbol 119 MovieClip Frame 36
gotoAndPlay (35);
Symbol 119 MovieClip Frame 37
Set("../clouds_1:already_played", "true");
Set("../clouds_2:already_played", "true");
if (..:turn == "1") {
Set("..:turn", "2");
} else {
Set("..:turn", "1");
}
tellTarget ("../uncover") {
gotoAndPlay ("cover");
tellTarget ("../") {
gotoAndStop ("game_over");
};
stop();
}
Symbol 121 Button
on (keyPress "<Right>") {
if ((((ground >= "20") and (ground < "90")) or ((ground >= "130") and (ground < "200"))) and ((ground_y - getProperty("../ground_" add (ground + "2"), _y)) < "10")) {
Set(("../tank_" add ..:turn) add ":ground", ground + "1");
tellTarget ("../tank_" add ..:turn) {
gotoAndPlay ("tank_location");
};
gotoAndStop (1);
}
}
on (keyPress "<Left>") {
if (((("20" < ground) and ("90" >= ground)) or (("130" < ground) and ("200" >= ground))) and ((ground_y - getProperty("../ground_" add (ground - "2"), _y)) < "10")) {
Set(("../tank_" add ..:turn) add ":ground", ground - "1");
tellTarget ("../tank_" add ..:turn) {
gotoAndPlay ("tank_location");
};
gotoAndStop (1);
}
}
on (keyPress "<Up>") {
if (("0" + cannon_rotation_modifier) < (cannon_rotation - tank_rotation)) {
Set(("..:cannon_" add ..:turn) add "_rotation", ("0" + tank_rotation) + cannon_rotation_modifier);
} else if ((cannon_rotation - tank_rotation) < ((-"180") + cannon_rotation_modifier)) {
Set(("..:cannon_" add ..:turn) add "_rotation", ((-"180") + tank_rotation) + cannon_rotation_modifier);
}
Set(("..:cannon_" add ..:turn) add "_rotation", cannon_rotation - turn_modifier);
tellTarget ("../tank_" add ..:turn) {
gotoAndPlay ("tank_rotation");
};
gotoAndStop (1);
}
on (keyPress "<Down>") {
if (("0" + cannon_rotation_modifier) < (cannon_rotation - tank_rotation)) {
Set(("..:cannon_" add ..:turn) add "_rotation", ("0" + tank_rotation) + cannon_rotation_modifier);
} else if ((cannon_rotation - tank_rotation) < ((-"180") + cannon_rotation_modifier)) {
Set(("..:cannon_" add ..:turn) add "_rotation", ((-"180") + tank_rotation) + cannon_rotation_modifier);
}
Set(("..:cannon_" add ..:turn) add "_rotation", cannon_rotation + turn_modifier);
tellTarget ("../tank_" add ..:turn) {
gotoAndPlay ("tank_rotation");
};
gotoAndStop (1);
}
on (keyPress "a") {
if (cannon_velocity < "100") {
Set("..:velocity_" add ..:turn, cannon_velocity + "1");
}
tellTarget ("../tank_" add ..:turn) {
gotoAndPlay ("tank_actions");
};
gotoAndStop (1);
}
on (keyPress "z") {
if ("1" < cannon_velocity) {
Set("..:velocity_" add ..:turn, cannon_velocity - "1");
}
tellTarget ("../tank_" add ..:turn) {
gotoAndPlay ("tank_actions");
};
gotoAndStop (1);
}
on (keyPress "<Space>") {
if (../explosion:projectile ne "true") {
Set("../explosion:exploding", "true");
Set("../explosion:velocity_width", getProperty(("../cannon_" add ..:turn) add "_velocity", _width) / "24");
Set("../explosion:velocity_height", getProperty(("../cannon_" add ..:turn) add "_velocity", _height) / "24");
if ("90" < current_rotation) {
Set("../explosion:velocity_width", -../explosion:velocity_width);
}
if (("180" < current_rotation) or (current_rotation < "0")) {
Set("../explosion:velocity_height", -../explosion:velocity_height);
}
tellTarget ("../explosion") {
gotoAndPlay ("projectile");
tellTarget (("../tank_" add ..:turn) add "/cannon_color/cannon_fire") {
gotoAndPlay ("fire");
};
Set("../explosion:projectile", "true");
gotoAndStop (1);
}
}
}
Symbol 122 MovieClip Frame 1
stop();
Symbol 122 MovieClip Frame 2
ground = eval (("../tank_" add ..:turn) add ":ground");
ground_y = getProperty("../ground_" add ground, _y);
cannon_rotation = eval (("..:cannon_" add ..:turn) add "_rotation");
tank_rotation = eval (("../tank_" add ..:turn) add ":tank_rotation");
cannon_rotation_modifier = eval (("../tank_" add ..:turn) add ":cannon_rotation_modifier");
turn_modifier = eval (("..:turn_" add ..:turn) add "_modifier");
cannon_velocity = eval ("..:velocity_" add ..:turn);
current_rotation = (-eval (("..:cannon_" add ..:turn) add "_rotation")) * eval (("..:turn_" add ..:turn) add "_modifier");
stop();
Symbol 141 MovieClip Frame 1
stop();
Symbol 141 MovieClip Frame 2
velocity_height = velocity_height - "0.02";
explosion_x = _x;
explosion_y = _y;
over_ground = int((_x + "2") / "4");
_x = ((explosion_x + (velocity_width * eval (("..:turn_" add ..:turn) add "_modifier"))) + (..:wind / "100"));
_y = (explosion_y - velocity_height);
if (explosion_y >= getProperty("../ground_" add over_ground, _y)) {
projectile = "false";
gotoAndPlay (4);
}
Symbol 141 MovieClip Frame 3
gotoAndPlay (2);
Symbol 141 MovieClip Frame 27
distance = "50";
ground_deforming = "0";
count = "1";
while (count < "221") {
explosion_x = _x;
explosion_y = _y;
ground_x = getProperty("../ground_" add count, _x);
ground_y = getProperty("../ground_" add count, _y);
if ((((((ground_x - explosion_x) * (ground_x - explosion_x)) + ((ground_y - explosion_y) * (ground_y - explosion_y))) < "2500") or ((((-"50") < (ground_x - explosion_x)) and ((ground_x - explosion_x) < "50")) and (ground_y < explosion_y))) and ("360" >= ground_y)) {
tellTarget ("../ground_" add count) {
gotoAndPlay ("deform");
};
ground_deforming = ground_deforming + "1";
}
count = count + "1";
}
Symbol 141 MovieClip Frame 28
if ("0" >= ground_deforming) {
gotoAndPlay (31);
}
Symbol 141 MovieClip Frame 30
gotoAndPlay (28);
Symbol 141 MovieClip Frame 50
if (..:turn == "1") {
Set("..:turn", "2");
} else {
Set("..:turn", "1");
}
gotoAndStop("../cover:turn_" add ..:turn);
tank_x = getProperty("../tank_" add ..:turn, _x);
tank_y = getProperty("../tank_" add ..:turn, _y);
hypotenuse = ((tank_x - explosion_x) * (tank_x - explosion_x)) + ((tank_y - explosion_y) * (tank_y - explosion_y));
if ((..:cpu eq "true") and (..:turn == "2")) {
Set("../cpu:old_armor", ..:armor_2);
}
if ("4900" >= hypotenuse) {
Set("..:armor_" add ..:turn, eval ("..:armor_" add ..:turn) - int(("100" - (hypotenuse / "70")) / "3"));
}
if ("0" >= eval ("..:armor_" add ..:turn)) {
if ((..:cpu eq "true") and (..:turn == "2")) {
Set("..:cpu", "false");
}
Set("..:armor_" add ..:turn, "0");
Set(("../tank_" add ..:turn) add ":killed", "true");
}
Set("../cpu:old_explosion_x", _x);
exploding = "false";
Set("../tank_1:once_through", "false");
Set("../tank_2:once_through", "false");
tellTarget ("../tank_1") {
gotoAndPlay ("tank_location");
tellTarget ("../tank_2") {
gotoAndPlay ("tank_location");
}
}
Symbol 141 MovieClip Frame 51
gotoAndStop (1);
Symbol 141 MovieClip Frame 75
distance = "35";
ground_deforming = "0";
count = "1";
while (count < "221") {
explosion_x = _x;
explosion_y = _y;
ground_x = getProperty("../ground_" add count, _x);
ground_y = getProperty("../ground_" add count, _y);
if ((((((ground_x - explosion_x) * (ground_x - explosion_x)) + ((ground_y - explosion_y) * (ground_y - explosion_y))) < "1225") or ((((-"35") < (ground_x - explosion_x)) and ((ground_x - explosion_x) < "35")) and (ground_y < explosion_y))) and ("360" >= ground_y)) {
tellTarget ("../ground_" add count) {
gotoAndPlay ("deform");
};
ground_deforming = ground_deforming + "1";
}
count = count + "1";
}
Symbol 141 MovieClip Frame 76
if ("0" >= ground_deforming) {
gotoAndPlay (79);
}
Symbol 141 MovieClip Frame 78
gotoAndPlay (76);
Symbol 143 MovieClip Frame 1
stop();
Symbol 143 MovieClip Frame 2
stop();
Symbol 143 MovieClip Frame 3
stop();
Symbol 146 MovieClip Frame 1
stop();
Symbol 146 MovieClip Frame 2
if ((../tank_1:once_through eq "true") and (../tank_2:once_through eq "true")) {
gotoAndPlay (6);
}
Symbol 146 MovieClip Frame 5
gotoAndPlay (2);
Symbol 146 MovieClip Frame 36
stop();
Symbol 147 MovieClip Frame 1
stop();
Symbol 147 MovieClip Frame 2
if (..:velocity_2 < "100") {
Set("..:velocity_2", ..:velocity_2 + "1");
} else {
gotoAndPlay (4);
}
Symbol 147 MovieClip Frame 3
tellTarget ("../tank_2") {
gotoAndPlay ("tank_rotation");
};
gotoAndStop (1);
Symbol 147 MovieClip Frame 4
if (aim_refined eq "false") {
tank_x = getProperty("../tank_1", _x);
if (("50" < (old_tank_x - tank_x)) or ((old_tank_x - tank_x) < (-"50"))) {
aim_refine = "1";
}
aim_refined = "true";
} else {
gotoAndPlay (6);
}
Symbol 147 MovieClip Frame 5
tellTarget ("../tank_2") {
gotoAndPlay ("tank_rotation");
};
gotoAndStop (1);
Symbol 147 MovieClip Frame 6
if (..:armor_2 < old_armor) {
gotoAndPlay (8);
} else {
gotoAndPlay (10);
}
Symbol 147 MovieClip Frame 7
tellTarget ("../tank_2") {
gotoAndPlay ("tank_rotation");
};
gotoAndStop (1);
Symbol 147 MovieClip Frame 8
if (retreated eq "false") {
if ("0" < retreat_count) {
if (((("130" < ../tank_2:ground) and ("200" >= ../tank_2:ground)) and (old_explosion_x >= getProperty("../tank_2", _x))) and ((getProperty("../ground_" add ../tank_2:ground, _y) - getProperty("../ground_" add (../tank_2:ground - "2"), _y)) < "10")) {
Set("../tank_2:ground", ../tank_2:ground - "1");
} else if ((((../tank_2:ground >= "130") and (../tank_2:ground < "200")) and (old_explosion_x < getProperty("../tank_2", _x))) and ((getProperty("../ground_" add ../tank_2:ground, _y) - getProperty("../ground_" add (../tank_2:ground + "2"), _y)) < "10")) {
Set("../tank_2:ground", ../tank_2:ground + "1");
} else {
retreat_count = "0";
}
retreat_count = retreat_count - "1";
} else {
aim_refine = "1";
retreated = "1";
}
} else {
gotoAndPlay (10);
}
Symbol 147 MovieClip Frame 9
tellTarget ("../tank_2") {
gotoAndPlay ("tank_location");
};
gotoAndStop (1);
Symbol 147 MovieClip Frame 10
if (angle_reset eq "false") {
if (..:cannon_2_rotation < "90") {
Set("..:cannon_2_rotation", ..:cannon_2_rotation + "1");
} else {
angle_reset = "true";
}
} else {
velocity_width = getProperty("../cannon_2_velocity", _width) / "24";
velocity_height = getProperty("../cannon_2_velocity", _height) / "24";
gotoAndPlay (12);
}
Symbol 147 MovieClip Frame 11
tellTarget ("../tank_2") {
gotoAndPlay ("tank_rotation");
};
gotoAndStop (1);
Symbol 147 MovieClip Frame 12
if (angle_detected eq "false") {
while (getProperty("../ground_" add int((_x + "2") / "4"), _y) >= _y) {
velocity_height = velocity_height - "0.02";
cpu_x = _x;
cpu_y = _y;
_x = ((cpu_x + (-velocity_width)) + (..:wind / "100"));
_y = (cpu_y - velocity_height);
}
tank_x = getProperty("../tank_1", _x);
tank_y = getProperty("../tank_1", _y);
hypotenuse = int(((tank_x - cpu_x) * (tank_x - cpu_x)) + ((tank_y - cpu_y) * (tank_y - cpu_y)));
if (hypotenuse < lowest_hypotenuse) {
lowest_hypotenuse = hypotenuse;
best_angle = ..:cannon_2_rotation;
}
if ("0" < angle_count) {
Set("..:cannon_2_rotation", ..:cannon_2_rotation - "1");
angle_count = angle_count - "1";
} else {
best_angle = best_angle + int((random(..:difficulty_level + "1") - (..:difficulty_level / "2")) / aim_refine);
if (best_angle < ..:cannon_2_rotation) {
best_angle = ..:cannon_2_rotation;
} else if ("90" < best_angle) {
best_angle = "90";
}
angle_detected = "true";
}
} else {
gotoAndPlay (14);
}
Symbol 147 MovieClip Frame 13
tellTarget ("../tank_2") {
gotoAndPlay ("tank_rotation");
};
gotoAndStop (1);
Symbol 147 MovieClip Frame 14
if (..:cannon_2_rotation < best_angle) {
Set("..:cannon_2_rotation", ..:cannon_2_rotation + "1");
} else if (best_angle < ..:cannon_2_rotation) {
Set("..:cannon_2_rotation", ..:cannon_2_rotation - "1");
} else {
old_tank_x = tank_x;
aim_refine = aim_refine + "1";
aim_refined = "false";
retreat_count = "25";
retreated = "false";
angle_reset = "false";
angle_detected = "false";
lowest_hypotenuse = "250000";
best_angle = "90";
angle_count = "90";
Set("../explosion:exploding", "true");
Set("../explosion:velocity_width", velocity_width);
Set("../explosion:velocity_height", velocity_height);
tellTarget ("../explosion") {
gotoAndPlay ("projectile");
tellTarget ("../tank_2/cannon_color/cannon_fire") {
gotoAndPlay ("fire");
};
gotoAndStop (1);
}
}
Symbol 147 MovieClip Frame 15
tellTarget ("../tank_2") {
gotoAndPlay ("tank_rotation");
};
gotoAndStop (1);