Frame 1
Frame 2
var music_1 = new Sound();
music_1.attachSound("game_music_1_linkage");
var music_2 = new Sound();
music_2.attachSound("game_music_2_linkage");
music_2.stop();
music_1.start(0, 999);
gotoAndPlay (3);
Frame 3
function fn_increment_cursor(temp_increment) {
_root.cursor_state = _root.cursor_state + temp_increment;
if (_root.cursor_state > _root.num_cursor_states) {
_root.cursor_state = 1;
} else if (_root.cursor_state < 1) {
_root.cursor_state = _root.num_cursor_states;
}
_root.cursor_2_mc._y = 71 + ((_root.cursor_state - 1) * 20);
}
function fn_execute(temp_state) {
if (temp_state == 1) {
fn_new_game();
} else if (temp_state == 2) {
fn_instructions();
}
}
function fn_new_game() {
_root.menu_items_mc.removeMovieClip();
_root.cursor_2_mc.removeMovieClip();
gotoAndPlay (6);
}
function fn_instructions() {
_root.menu_items_mc.removeMovieClip();
_root.cursor_2_mc.removeMovieClip();
gotoAndPlay (4);
}
_root.start_menu = false;
_root.activate_select = false;
_root.num_cursor_states = 2;
_root.cursor_state = 1;
_root.onEnterFrame = function () {
if (_root.start_menu == true) {
_root.attachMovie("menu_items_linkage", "menu_items_mc", 10);
_root.menu_items_mc._x = 55;
_root.menu_items_mc._y = 62;
_root.attachMovie("cursor_2_linkage", "cursor_2_mc", 11);
_root.cursor_2_mc._x = 51;
_root.cursor_2_mc._y = 71;
_root.start_menu = false;
_root.activate_select = true;
_root.cursor_state = 1;
}
};
Key.removeListener(control_listener);
var control_listener_start = new Object();
control_listener_start.onKeyDown = function () {
if (Key.getCode() == 38) {
fn_increment_cursor(-1);
} else if (Key.getCode() == 40) {
fn_increment_cursor(1);
} else if (Key.getCode() == 13) {
if (_root.activate_select == true) {
fn_execute(_root.cursor_state);
}
}
};
Key.addListener(control_listener_start);
stop();
Frame 4
Key.removeListener(control_listener);
Key.removeListener(control_listener_start);
var control_listener = new Object();
control_listener.onKeyDown = function () {
if (Key.getCode() == 13) {
gotoAndPlay (5);
}
};
Key.addListener(control_listener);
stop();
Frame 5
Key.removeListener(control_listener);
Key.removeListener(control_listener_start);
var control_listener = new Object();
control_listener.onKeyDown = function () {
if (Key.getCode() == 13) {
gotoAndPlay (3);
}
};
Key.addListener(control_listener);
stop();
Frame 6
function fn_increment_cursor(temp_increment) {
_root.cursor_state = _root.cursor_state + temp_increment;
if (_root.cursor_state > _root.num_cursor_states) {
_root.cursor_state = 1;
} else if (_root.cursor_state < 1) {
_root.cursor_state = _root.num_cursor_states;
}
_root.cursor._y = 65.6 + ((_root.cursor_state - 1) * 50);
}
function fn_execute(temp_state) {
if (temp_state == 1) {
_root.chosen_color = "purple";
gotoAndPlay (7);
} else if (temp_state == 2) {
_root.chosen_color = "red";
gotoAndPlay (7);
} else if (temp_state == 3) {
_root.chosen_color = "yellow";
gotoAndPlay (7);
}
}
Key.removeListener(control_listener_start);
_root.chosen_color = "";
_root.cursor_state = 1;
_root.num_cursor_states = 3;
Key.removeListener(control_listener);
var control_listener = new Object();
control_listener.onKeyDown = function () {
if (Key.getCode() == 38) {
fn_increment_cursor(-1);
} else if (Key.getCode() == 40) {
fn_increment_cursor(1);
} else if (Key.getCode() == 13) {
fn_execute(_root.cursor_state);
}
};
Key.addListener(control_listener);
stop();
Frame 7
function fn_random_perimiter_top() {
if (Math.random() >= 0.5) {
return("water");
}
return("ice");
}
function fn_random_perimiter_bottom() {
if (Math.random() >= 0.5) {
return("water");
}
return("sand");
}
function fn_random_perimiter_sides() {
n = Math.random();
if (n > 0.5) {
return("water");
}
n = Math.random();
if (n > 0.75) {
return("grass");
}
if (n > 0.5) {
return("mountain");
}
if (n > 0.25) {
return("rock");
}
return("tree");
}
function fn_random_top_1() {
n = Math.random();
if (n > 0.5) {
return("ice");
}
n = Math.random();
if (n > 0.75) {
return("grass");
}
if (n > 0.5) {
return("mountain");
}
if (n > 0.25) {
return("rock");
}
return("tree");
}
function fn_random_top_2() {
n = Math.random();
if (n > 0.75) {
return("ice");
}
n = Math.random();
if (n > 0.75) {
return("grass");
}
if (n > 0.5) {
return("mountain");
}
if (n > 0.25) {
return("rock");
}
return("tree");
}
function fn_random_bottom_1() {
n = Math.random();
if (n > 0.5) {
return("sand");
}
n = Math.random();
if (n > 0.75) {
return("grass");
}
if (n > 0.5) {
return("mountain");
}
if (n > 0.25) {
return("rock");
}
return("tree");
}
function fn_random_bottom_2() {
n = Math.random();
if (n > 0.75) {
return("sand");
}
n = Math.random();
if (n > 0.75) {
return("grass");
}
if (n > 0.5) {
return("mountain");
}
if (n > 0.25) {
return("rock");
}
return("tree");
}
function fn_random_body() {
n = Math.random();
if (n > 0.75) {
return("grass");
}
if (n > 0.5) {
return("mountain");
}
if (n > 0.25) {
return("rock");
}
return("tree");
}
music_1.stop();
music_2.start(0, 999);
Key.removeListener(control_listener);
_root.evo_cost = 10000;
_root.opp_evo_cost = 10000;
_root.player_population = 0;
_root.player_evo_points = 0;
_root.player_tiles = 0;
_root.player_grass = true;
_root.player_water = false;
_root.player_tree = false;
_root.player_rock = false;
_root.player_mountain = false;
_root.player_sand = false;
_root.player_ice = false;
_root.opponent_population = 0;
_root.opponent_evo_points = 0;
_root.opponent_tiles = 0;
_root.opponent_grass = true;
_root.opponent_water = false;
_root.opponent_tree = false;
_root.opponent_rock = false;
_root.opponent_mountain = false;
_root.opponent_sand = false;
_root.opponent_ice = false;
_root.total_tiles = 0;
_root.current_turn = 1;
var num_row = 11;
var num_col = 17;
var map = new Array(num_row);
i = 0;
while (i < num_row) {
map[i] = new Array(num_col);
j = 0;
while (j < num_col) {
map[i][j] = new Object();
map[i][j].player_pop = 0;
map[i][j].opponent_pop = 0;
if ((((i == 0) || (j == 0)) || (i == 10)) || (j == 16)) {
map[i][j].tile = "water";
} else if (((i == 1) && ((j == 1) || (j == 15))) || ((i == 9) && ((j == 1) || (j == 15)))) {
map[i][j].tile = "water";
} else if (i == 1) {
map[i][j].tile = fn_random_perimiter_top();
} else if (i == 9) {
map[i][j].tile = fn_random_perimiter_bottom();
} else if ((j == 1) || (j == 15)) {
map[i][j].tile = fn_random_perimiter_sides();
} else if (i == 2) {
map[i][j].tile = fn_random_top_1();
} else if (i == 3) {
map[i][j].tile = fn_random_top_2();
} else if (i == 8) {
map[i][j].tile = fn_random_bottom_1();
} else if (i == 7) {
map[i][j].tile = fn_random_bottom_2();
} else if ((((i == 4) && (j == 2)) || ((i == 5) && (j == 3))) || ((i == 6) && (j == 2))) {
map[i][j].tile = "grass";
} else if ((i == 5) && (j == 2)) {
map[i][j].tile = "grass";
map[i][j].player_pop = 1000;
} else if ((((i == 6) && (j == 14)) || ((i == 5) && (j == 13))) || ((i == 4) && (j == 14))) {
map[i][j].tile = "grass";
} else if ((i == 5) && (j == 14)) {
map[i][j].tile = "grass";
map[i][j].opponent_pop = 1000;
} else {
map[i][j].tile = fn_random_body();
}
j++;
}
i++;
}
i = 0;
while (i < num_row) {
j = 0;
while (j < num_col) {
if (map[i][j].tile != "water") {
_root.total_tiles++;
}
j++;
}
i++;
}
Frame 8
function fn_attach_tile(temp_row, temp_col) {
temp_tile = map[temp_row][temp_col].tile;
temp_depth = temp_col + (temp_row * 100);
_root.attachMovie("overlay_tile_linkage", (("overlay_" + temp_row) + "_") + temp_col, temp_depth + 10000);
if (temp_tile == "water") {
if (map[temp_row - 1][temp_col].tile == "water") {
if (map[temp_row][temp_col + 1].tile == "water") {
if (map[temp_row + 1][temp_col].tile == "water") {
if (map[temp_row][temp_col - 1].tile == "water") {
_root.attachMovie("tile_water_open_linkage", (("tile_" + temp_row) + "_") + temp_col, temp_depth);
} else {
_root.attachMovie("tile_water_left_linkage", (("tile_" + temp_row) + "_") + temp_col, temp_depth);
}
} else if (map[temp_row][temp_col - 1].tile == "water") {
_root.attachMovie("tile_water_down_linkage", (("tile_" + temp_row) + "_") + temp_col, temp_depth);
} else {
_root.attachMovie("tile_water_down_left_linkage", (("tile_" + temp_row) + "_") + temp_col, temp_depth);
}
} else if (map[temp_row + 1][temp_col].tile == "water") {
if (map[temp_row][temp_col - 1].tile == "water") {
_root.attachMovie("tile_water_right_linkage", (("tile_" + temp_row) + "_") + temp_col, temp_depth);
} else {
_root.attachMovie("tile_water_left_right_linkage", (("tile_" + temp_row) + "_") + temp_col, temp_depth);
}
} else if (map[temp_row][temp_col - 1].tile == "water") {
_root.attachMovie("tile_water_down_right_linkage", (("tile_" + temp_row) + "_") + temp_col, temp_depth);
} else {
_root.attachMovie("tile_water_down_left_right_linkage", (("tile_" + temp_row) + "_") + temp_col, temp_depth);
}
} else if (map[temp_row][temp_col + 1].tile == "water") {
if (map[temp_row + 1][temp_col].tile == "water") {
if (map[temp_row][temp_col - 1].tile == "water") {
_root.attachMovie("tile_water_up_linkage", (("tile_" + temp_row) + "_") + temp_col, temp_depth);
} else {
_root.attachMovie("tile_water_up_left_linkage", (("tile_" + temp_row) + "_") + temp_col, temp_depth);
}
} else if (map[temp_row][temp_col - 1].tile == "water") {
_root.attachMovie("tile_water_up_down_linkage", (("tile_" + temp_row) + "_") + temp_col, temp_depth);
} else {
_root.attachMovie("tile_water_up_down_left_linkage", (("tile_" + temp_row) + "_") + temp_col, temp_depth);
}
} else if (map[temp_row + 1][temp_col].tile == "water") {
if (map[temp_row][temp_col - 1].tile == "water") {
_root.attachMovie("tile_water_up_right_linkage", (("tile_" + temp_row) + "_") + temp_col, temp_depth);
} else {
_root.attachMovie("tile_water_up_left_right_linkage", (("tile_" + temp_row) + "_") + temp_col, temp_depth);
}
} else if (map[temp_row][temp_col - 1].tile == "water") {
_root.attachMovie("tile_water_up_down_right_linkage", (("tile_" + temp_row) + "_") + temp_col, temp_depth);
} else {
_root.attachMovie("tile_water_full_linkage", (("tile_" + temp_row) + "_") + temp_col, temp_depth);
}
} else if (temp_tile == "grass") {
_root.attachMovie("tile_grass_linkage", (("tile_" + temp_row) + "_") + temp_col, temp_depth);
} else if (temp_tile == "ice") {
_root.attachMovie("tile_ice_linkage", (("tile_" + temp_row) + "_") + temp_col, temp_depth);
} else if (temp_tile == "mountain") {
_root.attachMovie("tile_mountain_linkage", (("tile_" + temp_row) + "_") + temp_col, temp_depth);
} else if (temp_tile == "rock") {
_root.attachMovie("tile_rock_linkage", (("tile_" + temp_row) + "_") + temp_col, temp_depth);
} else if (temp_tile == "sand") {
_root.attachMovie("tile_sand_linkage", (("tile_" + temp_row) + "_") + temp_col, temp_depth);
} else if (temp_tile == "tree") {
_root.attachMovie("tile_tree_linkage", (("tile_" + temp_row) + "_") + temp_col, temp_depth);
}
_root[(("tile_" + temp_row) + "_") + temp_col]._x = 3.4 + (temp_col * 10);
_root[(("tile_" + temp_row) + "_") + temp_col]._y = 96.3 + (temp_row * 10);
_root[(("overlay_" + temp_row) + "_") + temp_col]._x = 3.4 + (temp_col * 10);
_root[(("overlay_" + temp_row) + "_") + temp_col]._y = 96.3 + (temp_row * 10);
}
function fn_display_creature() {
if (_root.player_rock == true) {
if (_root.player_mountain == true) {
if (_root.player_sand == true) {
if (_root.player_ice == true) {
if (_root.player_tree == true) {
_root.attachMovie(_root.chosen_color + "_complete_fur_linkage", "torso_mc", 20000);
_root.torso_mc._x = 12;
_root.torso_mc._y = 37;
} else {
_root.attachMovie(_root.chosen_color + "_torso_fur_linkage", "torso_mc", 20001);
_root.torso_mc._x = 18;
_root.torso_mc._y = 35;
_root.attachMovie(_root.chosen_color + "_legs_long_fur_linkage", "legs_mc", 20000);
_root.legs_mc._x = 15;
_root.legs_mc._y = 63;
}
} else if (_root.player_tree == true) {
_root.attachMovie(_root.chosen_color + "_complete_linkage", "torso_mc", 20000);
_root.torso_mc._x = 12;
_root.torso_mc._y = 36;
} else {
_root.attachMovie(_root.chosen_color + "_torso_linkage", "torso_mc", 20001);
_root.torso_mc._x = 20;
_root.torso_mc._y = 37;
_root.attachMovie(_root.chosen_color + "_legs_long_linkage", "legs_mc", 20000);
_root.legs_mc._x = 17;
_root.legs_mc._y = 65;
}
} else if (_root.player_ice == true) {
if (_root.player_tree == true) {
_root.attachMovie(_root.chosen_color + "_torso_fur_linkage", "torso_mc", 20003);
_root.torso_mc._x = 18;
_root.torso_mc._y = 44;
_root.attachMovie(_root.chosen_color + "_legs_small_fur_linkage", "legs_mc", 20002);
_root.legs_mc._x = 15;
_root.legs_mc._y = 73;
_root.attachMovie(_root.chosen_color + "_arm_up_left_fur_linkage", "left_arm_mc", 20001);
_root.left_arm_mc._x = 6;
_root.left_arm_mc._y = 53;
_root.attachMovie(_root.chosen_color + "_arm_up_right_fur_linkage", "right_arm_mc", 20000);
_root.right_arm_mc._x = 32;
_root.right_arm_mc._y = 53;
} else {
_root.attachMovie(_root.chosen_color + "_torso_fur_linkage", "torso_mc", 20001);
_root.torso_mc._x = 18;
_root.torso_mc._y = 44;
_root.attachMovie(_root.chosen_color + "_legs_small_fur_linkage", "legs_mc", 20000);
_root.legs_mc._x = 15;
_root.legs_mc._y = 73;
}
} else if (_root.player_tree == true) {
_root.attachMovie(_root.chosen_color + "_torso_linkage", "torso_mc", 20003);
_root.torso_mc._x = 20;
_root.torso_mc._y = 47;
_root.attachMovie(_root.chosen_color + "_legs_small_linkage", "legs_mc", 20002);
_root.legs_mc._x = 17;
_root.legs_mc._y = 75;
_root.attachMovie(_root.chosen_color + "_arm_up_left_linkage", "left_arm_mc", 20001);
_root.left_arm_mc._x = 8;
_root.left_arm_mc._y = 55;
_root.attachMovie(_root.chosen_color + "_arm_up_right_linkage", "right_arm_mc", 20000);
_root.right_arm_mc._x = 34;
_root.right_arm_mc._y = 55;
} else {
_root.attachMovie(_root.chosen_color + "_torso_linkage", "torso_mc", 20001);
_root.torso_mc._x = 20;
_root.torso_mc._y = 47;
_root.attachMovie(_root.chosen_color + "_legs_small_linkage", "legs_mc", 20000);
_root.legs_mc._x = 17;
_root.legs_mc._y = 75;
}
} else if (_root.player_sand == true) {
if (_root.player_ice == true) {
if (_root.player_tree == true) {
_root.attachMovie(_root.chosen_color + "_arm_up_left_fur_linkage", "left_arm_mc", 20001);
_root.left_arm_mc._x = 4;
_root.left_arm_mc._y = 43;
_root.attachMovie(_root.chosen_color + "_arm_up_right_fur_linkage", "right_arm_mc", 20000);
_root.right_arm_mc._x = 30;
_root.right_arm_mc._y = 43;
_root.attachMovie(_root.chosen_color + "_smart_tall_fur_linkage", "torso_mc", 20003);
_root.torso_mc._x = 16;
_root.torso_mc._y = 35;
} else {
_root.attachMovie(_root.chosen_color + "_smart_tall_fur_linkage", "torso_mc", 20000);
_root.torso_mc._x = 18;
_root.torso_mc._y = 37;
}
} else if (_root.player_tree == true) {
_root.attachMovie(_root.chosen_color + "_arm_up_left_linkage", "left_arm_mc", 20001);
_root.left_arm_mc._x = 6;
_root.left_arm_mc._y = 45;
_root.attachMovie(_root.chosen_color + "_arm_up_right_linkage", "right_arm_mc", 20000);
_root.right_arm_mc._x = 32;
_root.right_arm_mc._y = 45;
_root.attachMovie(_root.chosen_color + "_smart_tall_linkage", "torso_mc", 20003);
_root.torso_mc._x = 18;
_root.torso_mc._y = 37;
} else {
_root.attachMovie(_root.chosen_color + "_smart_tall_linkage", "torso_mc", 20000);
_root.torso_mc._x = 18;
_root.torso_mc._y = 37;
}
} else if (_root.player_ice == true) {
if (_root.player_tree == true) {
_root.attachMovie(_root.chosen_color + "_torso_fur_linkage", "torso_mc", 20002);
_root.torso_mc._x = 16;
_root.torso_mc._y = 52;
_root.attachMovie(_root.chosen_color + "_arm_up_left_fur_linkage", "left_arm_mc", 20001);
_root.left_arm_mc._x = 4;
_root.left_arm_mc._y = 60;
_root.attachMovie(_root.chosen_color + "_arm_up_right_fur_linkage", "right_arm_mc", 20000);
_root.right_arm_mc._x = 34;
_root.right_arm_mc._y = 60;
} else {
_root.attachMovie(_root.chosen_color + "_torso_fur_linkage", "torso_mc", 20000);
_root.torso_mc._x = 16;
_root.torso_mc._y = 52;
}
} else if (_root.player_tree == true) {
_root.attachMovie(_root.chosen_color + "_torso_linkage", "torso_mc", 20002);
_root.torso_mc._x = 18;
_root.torso_mc._y = 55;
_root.attachMovie(_root.chosen_color + "_arm_up_left_linkage", "left_arm_mc", 20001);
_root.left_arm_mc._x = 6;
_root.left_arm_mc._y = 63;
_root.attachMovie(_root.chosen_color + "_arm_up_right_linkage", "right_arm_mc", 20000);
_root.right_arm_mc._x = 36;
_root.right_arm_mc._y = 63;
} else {
_root.attachMovie(_root.chosen_color + "_torso_linkage", "torso_mc", 20000);
_root.torso_mc._x = 18;
_root.torso_mc._y = 55;
}
} else if (_root.player_mountain == true) {
if (_root.player_sand == true) {
if (_root.player_ice == true) {
if (_root.player_tree == true) {
_root.attachMovie(_root.chosen_color + "_slime_tall_fur_linkage", "torso_mc", 20003);
_root.torso_mc._x = 16;
_root.torso_mc._y = 36;
_root.attachMovie(_root.chosen_color + "_legs_small_fur_linkage", "legs_mc", 20002);
_root.legs_mc._x = 15;
_root.legs_mc._y = 73;
_root.attachMovie(_root.chosen_color + "_arm_up_left_fur_linkage", "left_arm_mc", 20001);
_root.left_arm_mc._x = 4;
_root.left_arm_mc._y = 38;
_root.attachMovie(_root.chosen_color + "_arm_up_right_fur_linkage", "right_arm_mc", 20000);
_root.right_arm_mc._x = 34;
_root.right_arm_mc._y = 38;
} else {
_root.attachMovie(_root.chosen_color + "_slime_tall_fur_linkage", "torso_mc", 20001);
_root.torso_mc._x = 16;
_root.torso_mc._y = 37;
_root.attachMovie(_root.chosen_color + "_legs_small_fur_linkage", "legs_mc", 20000);
_root.legs_mc._x = 15;
_root.legs_mc._y = 73;
}
} else if (_root.player_tree == true) {
_root.attachMovie(_root.chosen_color + "_slime_tall_linkage", "torso_mc", 20003);
_root.torso_mc._x = 18;
_root.torso_mc._y = 39;
_root.attachMovie(_root.chosen_color + "_legs_small_linkage", "legs_mc", 20002);
_root.legs_mc._x = 17;
_root.legs_mc._y = 75;
_root.attachMovie(_root.chosen_color + "_arm_up_left_linkage", "left_arm_mc", 20001);
_root.left_arm_mc._x = 6;
_root.left_arm_mc._y = 40;
_root.attachMovie(_root.chosen_color + "_arm_up_right_linkage", "right_arm_mc", 20000);
_root.right_arm_mc._x = 36;
_root.right_arm_mc._y = 40;
} else {
_root.attachMovie(_root.chosen_color + "_slime_tall_linkage", "torso_mc", 20001);
_root.torso_mc._x = 18;
_root.torso_mc._y = 39;
_root.attachMovie(_root.chosen_color + "_legs_small_linkage", "legs_mc", 20000);
_root.legs_mc._x = 17;
_root.legs_mc._y = 75;
}
} else if (_root.player_ice == true) {
if (_root.player_tree == true) {
_root.attachMovie(_root.chosen_color + "_arm_up_left_fur_linkage", "left_arm_mc", 20001);
_root.left_arm_mc._x = 4;
_root.left_arm_mc._y = 58;
_root.attachMovie(_root.chosen_color + "_arm_up_right_fur_linkage", "right_arm_mc", 20000);
_root.right_arm_mc._x = 34;
_root.right_arm_mc._y = 58;
_root.attachMovie(_root.chosen_color + "_legs_small_fur_linkage", "legs_mc", 20002);
_root.legs_mc._x = 15;
_root.legs_mc._y = 73;
_root.attachMovie(_root.chosen_color + "_slime_fur_linkage", "torso_mc", 20003);
_root.torso_mc._x = 16;
_root.torso_mc._y = 58;
} else {
_root.attachMovie(_root.chosen_color + "_legs_small_fur_linkage", "legs_mc", 20000);
_root.legs_mc._x = 15;
_root.legs_mc._y = 73;
_root.attachMovie(_root.chosen_color + "_slime_fur_linkage", "torso_mc", 20001);
_root.torso_mc._x = 16;
_root.torso_mc._y = 58;
}
} else if (_root.player_tree == true) {
_root.attachMovie(_root.chosen_color + "_arm_up_left_linkage", "left_arm_mc", 20001);
_root.left_arm_mc._x = 6;
_root.left_arm_mc._y = 58;
_root.attachMovie(_root.chosen_color + "_arm_up_right_linkage", "right_arm_mc", 20000);
_root.right_arm_mc._x = 36;
_root.right_arm_mc._y = 58;
_root.attachMovie(_root.chosen_color + "_legs_small_linkage", "legs_mc", 20002);
_root.legs_mc._x = 17;
_root.legs_mc._y = 75;
_root.attachMovie(_root.chosen_color + "_slime_linkage", "torso_mc", 20003);
_root.torso_mc._x = 18;
_root.torso_mc._y = 60;
} else {
_root.attachMovie(_root.chosen_color + "_legs_small_linkage", "legs_mc", 20000);
_root.legs_mc._x = 17;
_root.legs_mc._y = 75;
_root.attachMovie(_root.chosen_color + "_slime_linkage", "torso_mc", 20001);
_root.torso_mc._x = 18;
_root.torso_mc._y = 60;
}
} else if (_root.player_sand == true) {
if (_root.player_ice == true) {
if (_root.player_tree == true) {
_root.attachMovie(_root.chosen_color + "_slime_tall_fur_linkage", "torso_mc", 20002);
_root.torso_mc._x = 16;
_root.torso_mc._y = 45;
_root.attachMovie(_root.chosen_color + "_arm_up_left_fur_linkage", "left_arm_mc", 20001);
_root.left_arm_mc._x = 4;
_root.left_arm_mc._y = 48;
_root.attachMovie(_root.chosen_color + "_arm_up_right_fur_linkage", "right_arm_mc", 20000);
_root.right_arm_mc._x = 34;
_root.right_arm_mc._y = 48;
} else {
_root.attachMovie(_root.chosen_color + "_slime_tall_fur_linkage", "torso_mc", 20000);
_root.torso_mc._x = 16;
_root.torso_mc._y = 45;
}
} else if (_root.player_tree == true) {
_root.attachMovie(_root.chosen_color + "_slime_tall_linkage", "torso_mc", 20002);
_root.torso_mc._x = 18;
_root.torso_mc._y = 45;
_root.attachMovie(_root.chosen_color + "_arm_up_left_linkage", "left_arm_mc", 20001);
_root.left_arm_mc._x = 6;
_root.left_arm_mc._y = 48;
_root.attachMovie(_root.chosen_color + "_arm_up_right_linkage", "right_arm_mc", 20000);
_root.right_arm_mc._x = 36;
_root.right_arm_mc._y = 48;
} else {
_root.attachMovie(_root.chosen_color + "_slime_tall_linkage", "torso_mc", 20000);
_root.torso_mc._x = 18;
_root.torso_mc._y = 45;
}
} else if (_root.player_ice == true) {
if (_root.player_tree == true) {
_root.attachMovie(_root.chosen_color + "_slime_fur_linkage", "torso_mc", 20002);
_root.torso_mc._x = 15;
_root.torso_mc._y = 65;
_root.attachMovie(_root.chosen_color + "_arm_up_left_fur_linkage", "left_arm_mc", 20001);
_root.left_arm_mc._x = 4;
_root.left_arm_mc._y = 64;
_root.attachMovie(_root.chosen_color + "_arm_up_right_fur_linkage", "right_arm_mc", 20000);
_root.right_arm_mc._x = 34;
_root.right_arm_mc._y = 64;
} else {
_root.attachMovie(_root.chosen_color + "_slime_fur_linkage", "torso_mc", 20000);
_root.torso_mc._x = 15;
_root.torso_mc._y = 65;
}
} else if (_root.player_tree == true) {
_root.attachMovie(_root.chosen_color + "_slime_linkage", "torso_mc", 20002);
_root.torso_mc._x = 18;
_root.torso_mc._y = 65;
_root.attachMovie(_root.chosen_color + "_arm_up_left_linkage", "left_arm_mc", 20001);
_root.left_arm_mc._x = 6;
_root.left_arm_mc._y = 68;
_root.attachMovie(_root.chosen_color + "_arm_up_right_linkage", "right_arm_mc", 20000);
_root.right_arm_mc._x = 36;
_root.right_arm_mc._y = 68;
} else {
_root.attachMovie(_root.chosen_color + "_slime_linkage", "torso_mc", 20000);
_root.torso_mc._x = 18;
_root.torso_mc._y = 65;
}
}
if ((_root.chosen_color == "purple") || (_root.chosen_color == "red")) {
_root.opponent_color = "yellow";
} else {
_root.opponent_color = "red";
}
i = 0;
while (i < num_row) {
j = 0;
while (j < num_col) {
fn_attach_tile(i, j);
j++;
}
i++;
}
var temp_pop = 0;
var temp_opp_pop = 0;
var temp_inhab = 0;
var temp_inhab_opp = 0;
i = 0;
while (i < num_row) {
j = 0;
while (j < num_col) {
temp_pop = temp_pop + map[i][j].player_pop;
temp_opp_pop = temp_opp_pop + map[i][j].opponent_pop;
if (map[i][j].player_pop >= 1000) {
_root[(("overlay_" + i) + "_") + j].gotoAndStop(_root.chosen_color);
temp_inhab = temp_inhab + 1;
} else if (map[i][j].opponent_pop >= 1000) {
_root[(("overlay_" + i) + "_") + j].gotoAndStop(_root.opponent_color);
temp_inhab_opp = temp_inhab_opp + 1;
}
j++;
}
i++;
}
_root.evo_points.text = _root.player_evo_points;
_root.player_population = temp_pop;
_root.opponent_population = temp_opp_pop;
_root.opponent_tiles = temp_inhab_opp;
_root.player_tiles = temp_inhab;
_root.population.text = _root.player_population;
_root.tiles_inhabited.text = _root.player_tiles;
_root.turns.text = _root.current_turn;
_root.torso_mc.removeMovieClip();
_root.left_arm_mc.removeMovieClip();
_root.right_arm_mc.removeMovieClip();
_root.legs_mc.removeMovieClip();
fn_display_creature();
Frame 9
function fn_increment_cursor(temp_increment) {
_root.cursor_state = _root.cursor_state + temp_increment;
if (_root.cursor_state > _root.num_cursor_states) {
_root.cursor_state = 1;
} else if (_root.cursor_state < 1) {
_root.cursor_state = _root.num_cursor_states;
}
_root.cursor._y = 51 + ((_root.cursor_state - 1) * 10);
}
function fn_execute(temp_state) {
if (temp_state == 1) {
fn_next_turn();
} else if (temp_state == 2) {
fn_evo_store();
} else if (temp_state == 3) {
fn_exit_play();
}
}
function fn_evo_store() {
i = 0;
while (i < num_row) {
j = 0;
while (j < num_col) {
_root[(("tile_" + i) + "_") + j].removeMovieClip();
_root[(("overlay_" + i) + "_") + j].removeMovieClip();
j++;
}
i++;
}
_root.torso_mc.removeMovieClip();
_root.left_arm_mc.removeMovieClip();
_root.right_arm_mc.removeMovieClip();
_root.legs_mc.removeMovieClip();
gotoAndPlay (10);
}
function fn_next_turn() {
if ((_root.player_tiles + _root.opponent_tiles) == _root.total_tiles) {
_root.torso_mc.removeMovieClip();
_root.left_arm_mc.removeMovieClip();
_root.right_arm_mc.removeMovieClip();
_root.legs_mc.removeMovieClip();
gotoAndPlay (12);
} else {
i = 0;
while (i < num_row) {
j = 0;
while (j < num_col) {
var _local2 = 0;
var _local3 = 0;
if ((map[i][j].player_pop < 1000) && (map[i][j].opponent_pop < 1000)) {
if (_root["player_" + map[i][j].tile] == true) {
if (map[i - 1][j].player_pop >= 1000) {
_local2 = _local2 + 80;
}
if (map[i + 1][j].player_pop >= 1000) {
_local2 = _local2 + 80;
}
if (map[i][j - 1].player_pop >= 1000) {
_local2 = _local2 + 80;
}
if (map[i][j + 1].player_pop >= 1000) {
_local2 = _local2 + 80;
}
map[i][j].player_pop = map[i][j].player_pop + _local2;
}
if (_root["opponent_" + map[i][j].tile] == true) {
if (map[i - 1][j].opponent_pop >= 1000) {
_local3 = _local3 + 80;
}
if (map[i + 1][j].opponent_pop >= 1000) {
_local3 = _local3 + 80;
}
if (map[i][j - 1].opponent_pop >= 1000) {
_local3 = _local3 + 80;
}
if (map[i][j + 1].opponent_pop >= 1000) {
_local3 = _local3 + 80;
}
}
map[i][j].opponent_pop = map[i][j].opponent_pop + _local3;
if ((map[i][j].player_pop >= 1000) && (map[i][j].opponent_pop >= 1000)) {
if (Math.random() >= 0.5) {
map[i][j].player_pop = 1000;
map[i][j].opponent_pop = 0;
} else {
map[i][j].opponent_pop = 1000;
map[i][j].player_pop = 0;
}
} else if (map[i][j].player_pop >= 1000) {
map[i][j].player_pop = 1000;
map[i][j].opponent_pop = map[i][j].opponent_pop / 2;
} else if (map[i][j].opponent_pop >= 1000) {
map[i][j].opponent_pop = 1000;
map[i][j].player_pop = map[i][j].player_pop / 2;
}
}
j++;
}
i++;
}
if ((_root.opponent_evo_points >= _root.opp_evo_cost) && (_root.opp_evo_cost < 55000)) {
_root.opponent_evo_points = _root.opponent_evo_points - _root.opp_evo_cost;
_root.opp_evo_cost = _root.opp_evo_cost + 10000;
temp_counter = 0;
var _local4 = new Array();
if (_root.opponent_tree == false) {
_local4[temp_counter] = "tree";
temp_counter++;
}
if (_root.opponent_mountain == false) {
_local4[temp_counter] = "mountain";
temp_counter++;
}
if (_root.opponent_rock == false) {
_local4[temp_counter] = "rock";
temp_counter++;
}
if (_root.opponent_sand == false) {
_local4[temp_counter] = "sand";
temp_counter++;
}
if (_root.opponent_ice == false) {
_local4[temp_counter] = "ice";
temp_counter++;
}
temp_random = Math.floor(Math.random() * _local4.length);
if (temp_random == _local4.length) {
temp_random--;
}
_root["opponent_" + _local4[temp_random]] = true;
}
_root.player_evo_points = _root.player_evo_points + Math.floor(_root.player_population / 32);
_root.opponent_evo_points = _root.opponent_evo_points + Math.floor(_root.opponent_population / 32);
_root.current_turn++;
gotoAndPlay (8);
}
}
function fn_exit_play() {
i = 0;
while (i < num_row) {
j = 0;
while (j < num_col) {
_root[(("tile_" + i) + "_") + j].removeMovieClip();
_root[(("overlay_" + i) + "_") + j].removeMovieClip();
j++;
}
i++;
}
_root.torso_mc.removeMovieClip();
_root.left_arm_mc.removeMovieClip();
_root.right_arm_mc.removeMovieClip();
_root.legs_mc.removeMovieClip();
gotoAndPlay (11);
}
Key.removeListener(control_listener);
_root.cursor_state = 1;
_root.num_cursor_states = 3;
var control_listener = new Object();
control_listener.onKeyDown = function () {
if (Key.getCode() == 38) {
fn_increment_cursor(-1);
} else if (Key.getCode() == 40) {
fn_increment_cursor(1);
} else if (Key.getCode() == 13) {
if (_root.activate_select == true) {
fn_execute(_root.cursor_state);
}
}
};
Key.addListener(control_listener);
stop();
Frame 10
function fn_increment_cursor(temp_increment) {
_root.cursor_state = _root.cursor_state + temp_increment;
if (_root.cursor_state > _root.num_cursor_states) {
_root.cursor_state = 1;
} else if (_root.cursor_state < 1) {
_root.cursor_state = _root.num_cursor_states;
}
_root.cursor_3._y = 70 + ((_root.cursor_state - 1) * 13);
}
function fn_execute(temp_state) {
if (temp_state == 1) {
fn_adapt("tree");
} else if (temp_state == 2) {
fn_adapt("mountain");
} else if (temp_state == 3) {
fn_adapt("rock");
} else if (temp_state == 4) {
fn_adapt("sand");
} else if (temp_state == 5) {
fn_adapt("ice");
} else if (temp_state == 6) {
gotoAndPlay (8);
}
}
function fn_adapt(temp_type) {
if ((_root.player_evo_points >= _root.evo_cost) && (_root["player_" + temp_type] == false)) {
_root["player_" + temp_type] = true;
_root.player_evo_points = _root.player_evo_points - _root.evo_cost;
_root.evo_cost = _root.evo_cost + 10000;
_root.cost.text = _root.evo_cost;
_root.evo_points.text = _root.player_evo_points;
_root["check_" + temp_type].gotoAndStop(2);
}
}
if (_root.player_tree == true) {
_root.check_tree.gotoAndStop(2);
}
if (_root.player_mountain == true) {
_root.check_mountain.gotoAndStop(2);
}
if (_root.player_rock == true) {
_root.check_rock.gotoAndStop(2);
}
if (_root.player_sand == true) {
_root.check_sand.gotoAndStop(2);
}
if (_root.player_ice == true) {
_root.check_ice.gotoAndStop(2);
}
_root.cost.text = _root.evo_cost;
_root.evo_points.text = _root.player_evo_points;
Key.removeListener(control_listener);
_root.cursor_state = 1;
_root.num_cursor_states = 6;
var control_listener = new Object();
control_listener.onKeyDown = function () {
if (Key.getCode() == 38) {
fn_increment_cursor(-1);
} else if (Key.getCode() == 40) {
fn_increment_cursor(1);
} else if (Key.getCode() == 13) {
if (_root.activate_select == true) {
fn_execute(_root.cursor_state);
}
}
};
Key.addListener(control_listener);
stop();
Frame 11
function fn_increment_cursor(temp_increment) {
_root.cursor_state = _root.cursor_state + temp_increment;
if (_root.cursor_state > _root.num_cursor_states) {
_root.cursor_state = 1;
} else if (_root.cursor_state < 1) {
_root.cursor_state = _root.num_cursor_states;
}
_root.cursor_2._y = 86 + ((_root.cursor_state - 1) * 20);
}
function fn_execute(temp_state) {
if (temp_state == 1) {
i = 0;
while (i < num_row) {
j = 0;
while (j < num_col) {
_root[(("tile_" + i) + "_") + j].removeMovieClip();
_root[(("overlay_" + i) + "_") + j].removeMovieClip();
j++;
}
i++;
}
_root.torso_mc.removeMovieClip();
gotoAndPlay (3);
} else if (temp_state == 2) {
gotoAndPlay (8);
}
}
function fn_exit_play() {
gotoAndPlay (2);
}
Key.removeListener(control_listener);
_root.cursor_state = 2;
_root.num_cursor_states = 2;
var control_listener = new Object();
control_listener.onKeyDown = function () {
if (Key.getCode() == 38) {
fn_increment_cursor(-1);
} else if (Key.getCode() == 40) {
fn_increment_cursor(1);
} else if (Key.getCode() == 13) {
if (_root.activate_select == true) {
fn_execute(_root.cursor_state);
}
}
};
Key.addListener(control_listener);
stop();
Frame 12
Key.removeListener(control_listener);
_root.final_select_ok = false;
_root.player_final.text = _root.player_tiles;
_root.opponent_final.text = _root.opponent_tiles;
if (_root.player_tiles > _root.opponent_tiles) {
_root.outcome.text = "You won!";
} else if (_root.player_tiles < _root.opponent_tiles) {
_root.outcome.text = "Try again!";
} else if (_root.player_tiles == _root.opponent_tiles) {
_root.outcome.text = "It's a tie!";
}
_root.onEnterFrame = function () {
if (_root.final_select_ok == true) {
if (Key.isDown(13)) {
i = 0;
while (i < num_row) {
j = 0;
while (j < num_col) {
_root[(("tile_" + i) + "_") + j].removeMovieClip();
_root[(("overlay_" + i) + "_") + j].removeMovieClip();
j++;
}
i++;
}
_root.final_select_ok = false;
gotoAndPlay (2);
}
}
};
stop();
Symbol 9 Button
on (release) {
getURL ("http://www.newgrounds.com", "blank");
}
Symbol 14 Button
on (release) {
_root.gotoAndPlay(2);
}
Symbol 15 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
bar._xscale = PercentLoaded;
} else {
gotoAndStop ("loaded");
}
Symbol 15 MovieClip Frame 2
gotoAndPlay (1);
Symbol 296 MovieClip [overlay_tile_linkage] Frame 1
stop();
Symbol 296 MovieClip [overlay_tile_linkage] Frame 2
stop();
Symbol 296 MovieClip [overlay_tile_linkage] Frame 3
stop();
Symbol 296 MovieClip [overlay_tile_linkage] Frame 4
stop();
Symbol 299 MovieClip Frame 1
stop();
Symbol 303 MovieClip Frame 615
gotoAndPlay (2);
Symbol 306 MovieClip Frame 1000
gotoAndPlay (2);
Symbol 311 MovieClip Frame 699
gotoAndPlay (2);
Symbol 314 MovieClip Frame 550
gotoAndPlay (2);
Symbol 317 MovieClip Frame 400
gotoAndPlay (2);
Symbol 338 MovieClip Frame 45
_root.start_menu = true;
stop();
Symbol 372 MovieClip Frame 1
stop();
Symbol 372 MovieClip Frame 2
stop();
Symbol 385 MovieClip Frame 22
_root.final_select_ok = true;
stop();