home *** CD-ROM | disk | FTP | other *** search
- scenario
- {
-
- static int temp_capture;
- static int old_scholar_size = 1;
-
-
- //player one military buildings
- static int one_rax_1 = find_build(1, "Barracks");
- static int one_rax_2 = find_build(1, "Barracks");
- static int one_rax_3 = find_build(1, "Barracks");
- static int one_stable_1 = find_build(1, "Stable");
- static int one_stable_2 = find_build(1, "Stable");
- static int one_stable_3 = find_build(1, "Stable");
-
- //player two military buildings
- static int two_rax_1 = find_build(2, "Barracks");
- static int two_rax_2 = find_build(2, "Barracks");
- static int two_rax_3 = find_build(2, "Barracks");
- static int two_stable_1 = find_build(2, "Stable");
- static int two_stable_2 = find_build(2, "Stable");
- static int two_stable_3 = find_build(2, "Stable");
-
- //player three military buildings
- static int three_rax_1 = find_build(3, "Barracks");
- static int three_rax_2 = find_build(3, "Barracks");
- static int three_rax_3 = find_build(3, "Barracks");
- static int three_stable_1 = find_build(3, "Stable");
- static int three_stable_2 = find_build(3, "Stable");
- static int three_stable_3 = find_build(3, "Stable");
-
- //player four military buildings
- static int four_rax_1 = find_build(4, "Barracks");
- static int four_rax_2 = find_build(4, "Barracks");
- static int four_rax_3 = find_build(4, "Barracks");
- static int four_stable_1 = find_build(4, "Stable");
- static int four_stable_2 = find_build(4, "Stable");
- static int four_stable_3 = find_build(4, "Stable");
-
- static int high_kill1;
- static int high_kill2;
- static int high_kill3;
- static int high_kill4;
- static int low_kill1;
- static int low_kill2;
- static int low_kill3;
- static int low_kill4;
- static int high_kill1_time;
- static int high_kill2_time;
- static int high_kill3_time;
- static int high_kill4_time;
- static int low_kill1_time;
- static int low_kill2_time;
- static int low_kill3_time;
- static int low_kill4_time;
-
- static int who_is_it = find_unit(8, "scholar");
- static int who = 8;
- static origin_size = get_unit_scale(who, who_is_it);
- static int fort_id = find_build(8, "Fort");
-
- int high_num;
- static int high_nation = 8;
- int temp_num;
-
- static int x;
- static int y;
- int nation;
- int age_up;
- static int upgrade_level1 = 10;
- static int upgrade_level2 = 10;
- static int upgrade_level3 = 10;
- static int upgrade_level4 = 10;
- int nation_age;
- int building;
-
- static int scholar_step = 2;
-
- static int revealed;
-
- static factor = 1.5;
-
- static int capture1;
- static int capture2;
- static int capture3;
- static int capture4;
-
- static int step1 = 1;
- int new_step1;
-
- static int step2 = 1;
- int new_step2;
-
- static int step3 = 1;
- int new_step3;
-
- static int step4 = 1;
- int new_step4;
-
- int train_amount;
-
- static int scholar_penalty = 5;
-
- String text_cap1;
- String text_cap2;
- String text_cap3;
- String text_cap4;
-
- static int old_size = 1;
- int cur_size;
-
- static int high_killer;
- static int low_killer;
- static int high_kills;
- static int low_kills;
- int kills;
- int kill_difference;
-
- static int top = 92;
- static int bottom = 141;
- static int left = 96;
- static int right = 149;
-
- static int game_over = get_time_limit();
- static int cur_time;
-
- int high_capture;
- int who_capture;
-
- static int num_players;
-
- run_once {
- set_victory_message($S("You have captured the scholar!"));
- set_defeat_message($S("You never made it home."));
- //INIT SOME STUFF
- //for (n = 2; n < 8; n++) {
- //if (get_leader_name(n) == "Computer") {
- //defeat(n);
- //}
- //}
- //for (nation = 1; nation < 8; nation++) {
- //if (is_defeated(nation)) break;
- // else num_players++;
- // }//num players
- num_players = 4;
- //set_time_limit(10);//set time limit
- unit_costs_disable();//disable unit costs
- set_object_type_max_health("scholar", 1000);//set scholar health
-
- //make everyone friendly like
- for (nation = num_players; nation > 0; nation--) {
- //for (tribe = num_players; tribe > 1; tribe--) {
- // if (tribe == nation) {
- //tribe++;
- // }
- // if (tribe >= num_players) break;
- //if (!have_peace(nation, tribe)) make_peace(nation, tribe);
- //}
- disable_city_defeat(nation);
- //gain_tech(nation, "The Art of War");
- //gain_tech(nation, "Mercenaries");
- //gain_tech(nation, "Standing Army");
- //set_population_cap(nation, 100);
- }
- disable_city_defeat(8);
-
- //set scholar scale (starts as usual)
- set_unit_scale(who, who_is_it, 4);
-
- //set text box values
- text_cap1 = real_time(capture1);
- text_cap2 = real_time(capture2);
- text_cap3 = real_time(capture3);
- text_cap4 = real_time(capture4);
-
- add_objective_text($S("Win by holding the scholar for 3 minutes."), 13, "");
- add_objective_text("", 10, "");
- add_objective_text(parse("Red time held " + text_cap1), 1, "");
- if (num_players >= 2) add_objective_text(parse("Blue time held " + text_cap2), 2, "");
- if (num_players >= 3) add_objective_text(parse("Purple time held " + text_cap3), 3, "");
- if (num_players >= 4) add_objective_text(parse("Green time held " + text_cap4), 4, "");
- add_objective_text(" ", 11, "");
- add_objective_text(" ", 12, "");
-
- //queue up units
- train_amount = 1;
-
- train_unit_at(1, train_amount, "hoplites", one_rax_1);
- train_unit_at(1, train_amount, "bowmen", one_rax_2);
- train_unit_at(1, train_amount, "slingers", one_rax_3);
- train_unit_at(2, train_amount, "hoplites", two_rax_1);
- train_unit_at(2, train_amount, "bowmen", two_rax_2);
- train_unit_at(2, train_amount, "slingers", two_rax_3);
- train_unit_at(3, train_amount, "hoplites", three_rax_1);
- train_unit_at(3, train_amount, "bowmen", three_rax_2);
- train_unit_at(3, train_amount, "slingers", three_rax_3);
- train_unit_at(4, train_amount, "hoplites", four_rax_1);
- train_unit_at(4, train_amount, "bowmen", four_rax_2);
- train_unit_at(4, train_amount, "slingers", four_rax_3);
-
- train_unit_at(1, train_amount, "light horse", one_stable_1);
- train_unit_at(1, train_amount, "cataphract", one_stable_2);
- train_unit_at(1, train_amount, "horse archer", one_stable_3);
- train_unit_at(2, train_amount, "light horse", two_stable_1);
- train_unit_at(2, train_amount, "cataphract", two_stable_2);
- train_unit_at(2, train_amount, "horse archer", two_stable_3);
- train_unit_at(3, train_amount, "light horse", three_stable_1);
- train_unit_at(3, train_amount, "cataphract", three_stable_2);
- train_unit_at(3, train_amount, "horse archer", three_stable_3);
- train_unit_at(4, train_amount, "light horse", four_stable_1);
- train_unit_at(4, train_amount, "cataphract", four_stable_2);
- train_unit_at(4, train_amount, "horse archer", four_stable_3);
-
- for (nation = num_players; nation > 0; nation--) {
- for (n = 6; n > 0; n--) {
- building = find_military_build(nation);
- toggle_infinite_queue(nation, building, 1);
- }
- }
-
- //set build time factors
- factor = .7;
-
- time = type_build_time("Slingers") * factor;
- set_type_build_time("Slingers", time);
- time = type_build_time("Javelineers") * factor;
- set_type_build_time("Javelineers", time);
- time = type_build_time("Elite Javelineers") * factor;
- set_type_build_time("Elite Javelineers", time);
- time = type_build_time("Fire Lances") * factor;
- set_type_build_time("Fire Lances", time);
- time = type_build_time("Arquebusiers") * factor;
- set_type_build_time("Arquebusiers", time);
- time = type_build_time("Heavy Fire Lances") * factor;
- set_type_build_time("Heavy Fire Lances", time);
- time = type_build_time("Musketeers") * factor;
- set_type_build_time("Musketeers", time);
- time = type_build_time("Manchu Musketeers") * factor;
- set_type_build_time("Manchu Musketeers", time);
- time = type_build_time("Riflemen") * factor;
- set_type_build_time("Riflemen", time);
- time = type_build_time("Manchu Riflemen") * factor;
- set_type_build_time("Manchu Riflemen", time);
- time = type_build_time("Infantry") * factor;
- set_type_build_time("Infantry", time);
- time = type_build_time("Jaguar Infantry") * factor;
- set_type_build_time("Jaguar Infantry", time);
- time = type_build_time("Manchu Infantry") * factor;
- set_type_build_time("Manchu Infantry", time);
- time = type_build_time("Volksgrenadiers") * factor;
- set_type_build_time("Volksgrenadiers", time);
- time = type_build_time("Red Guards Infantry") * factor;
- set_type_build_time("Red Guards Infantry", time);
- time = type_build_time("Assault Infantry") * factor;
- set_type_build_time("Assault Infantry", time);
- time = type_build_time("Jaguar Assault Infantry") * factor;
- set_type_build_time("Jaguar Assault Infantry", time);
- time = type_build_time("Shock Infantry") * factor;
- set_type_build_time("Shock Infantry", time);
-
- time = type_build_time("Hoplites") * factor;
- set_type_build_time("Hoplites", time);
- time = type_build_time("Solduri") * factor;
- set_type_build_time("Solduri", time);
- time = type_build_time("Phalanx") * factor;
- set_type_build_time("Phalanx", time);
- time = type_build_time("Barbarians") * factor;
- set_type_build_time("Barbarians", time);
- time = type_build_time("Pikemen") * factor;
- set_type_build_time("Pikemen", time);
- time = type_build_time("Elite Bushi") * factor;
- set_type_build_time("Elite Bushi", time);
- time = type_build_time("Vandals") * factor;
- set_type_build_time("Vandals", time);
- time = type_build_time("Elite Pikemen") * factor;
- set_type_build_time("Elite Pikemen", time);
- time = type_build_time("Samurai") * factor;
- set_type_build_time("Samurai", time);
- time = type_build_time("Landsknechts") * factor;
- set_type_build_time("Landsknechts", time);
- time = type_build_time("Fusiliers") * factor;
- set_type_build_time("Fusiliers", time);
- time = type_build_time("Gun Samurai") * factor;
- set_type_build_time("Gun Samurai", time);
- time = type_build_time("Anti-Tank Rifle") * factor;
- set_type_build_time("Anti-Tank Rifle", time);
- time = type_build_time("Bazooka") * factor;
- set_type_build_time("Bazooka", time);
- time = type_build_time("Anti-Tank Missile") * factor;
- set_type_build_time("Anti-Tank Missile", time);
-
- time = type_build_time("Bowmen") * factor;
- set_type_build_time("Bowmen", time);
- time = type_build_time("Archers") * factor;
- set_type_build_time("Archers", time);
- time = type_build_time("Crossbowmen") * factor;
- set_type_build_time("Crossbowmen", time);
-
- time = type_build_time("Machine Gun") * factor;
- set_type_build_time("Machine Gun", time);
- time = type_build_time("Heavy Machine Gun") * factor;
- set_type_build_time("Heavy Machine Gun", time);
- time = type_build_time("MG42") * factor;
- set_type_build_time("MG42", time);
- time = type_build_time("Advanced Machine Gun") * factor;
- set_type_build_time("Advanced Machine Gun", time);
-
- time = type_build_time("Flamethrower") * factor;
- set_type_build_time("Flamethrower", time);
-
- time = type_build_time("Scout") * factor;
- set_type_build_time("Scout", time);
- time = type_build_time("Explorer") * factor;
- set_type_build_time("Explorer", time);
- time = type_build_time("Commando") * factor;
- set_type_build_time("Commando", time);
- time = type_build_time("Special Forces") * factor;
- set_type_build_time("Special Forces", time);
- time = type_build_time("Elite Special Forces") * factor;
- set_type_build_time("Elite Special Forces", time);
-
- time = type_build_time("Light Horse") * factor;
- set_type_build_time("Light Horse", time);
- time = type_build_time("Light Cavalry") * factor;
- set_type_build_time("Light Cavalry", time);
- time = type_build_time("Rusiny Lancer") * factor;
- set_type_build_time("Rusiny Lancer", time);
- time = type_build_time("Elite Light Cavalry") * factor;
- set_type_build_time("Elite Light Cavalry", time);
- time = type_build_time("Cossack") * factor;
- set_type_build_time("Cossack", time);
- time = type_build_time("Hussar") * factor;
- set_type_build_time("Hussar", time);
- time = type_build_time("Don Cossack") * factor;
- set_type_build_time("Don Cossack", time);
- time = type_build_time("Armored Car") * factor;
- set_type_build_time("Armored Car", time);
- time = type_build_time("Armored Scout Car") * factor;
- set_type_build_time("Armored Scout Car", time);
- time = type_build_time("Armored Cavalry") * factor;
- set_type_build_time("Armored Cavalry", time);
-
- time = type_build_time("Cataphract") * factor;
- set_type_build_time("Cataphract", time);
- time = type_build_time("Knight") * factor;
- set_type_build_time("Knight", time);
- time = type_build_time("Heavy Knight") * factor;
- set_type_build_time("Heavy Knight", time);
- time = type_build_time("Cuirassier") * factor;
- set_type_build_time("Cuirassier", time);
- time = type_build_time("Light Tank") * factor;
- set_type_build_time("Light Tank", time);
- time = type_build_time("Tank") * factor;
- set_type_build_time("Tank", time);
- time = type_build_time("Leopard Tank") * factor;
- set_type_build_time("Leopard Tank", time);
- time = type_build_time("Main Battle Tank") * factor;
- set_type_build_time("Main Battle Tank", time);
- time = type_build_time("Tiger Tank") * factor;
- set_type_build_time("Tiger Tank", time);
- time = type_build_time("T80 Tank") * factor;
- set_type_build_time("T80 Tank", time);
-
- time = type_build_time("Horse Archer") * factor;
- set_type_build_time("Horse Archer", time);
- time = type_build_time("Heavy Horse Archer") * factor;
- set_type_build_time("Heavy Horse Archer", time);
- time = type_build_time("Dragoon") * factor;
- set_type_build_time("Dragoon", time);
- time = type_build_time("Carbineer") * factor;
- set_type_build_time("Carbineer", time);
-
- //set timers
- set_timer("hold_scholar", 1);
- set_timer("kill_adjuster", 30);
- set_timer("scholar_move_order", rand_int(3, 15));
-
- }
-
- //find if game is over and award victor
- cur_time = time_min();
-
- if (capture1 >= 180) {
- high_capture = capture1;
- who_capture = 1;
- victory(1);
- }
- else if (capture2 >= 180) {
- high_capture = capture2;
- who_capture = 2;
- victory(2);
- }
- else if (capture3 >= 180) {
- high_capture = capture3;
- who_capture = 3;
- victory(3);
- }
- else if (capture4 >= 180) {
- high_capture = capture4;
- who_capture = 4;
- victory(4);
- }
-
- if (timer_expired("hold_scholar")) {
-
- if (territory_object(who, who_is_it) != 8) {
- if (who == 1) {
- capture1 = capture1 - 1;
- }
-
- if (who == 2) {
- capture2 = capture2 - 1;
- }
-
- if (who == 3) {
- capture3 = capture3 - 1;
- }
-
- if (who == 4) {
- capture4 = capture4 - 1;
- }
- } else {
- if (who == 1) {
- capture1 = capture1 + 1;
- }
-
- if (who == 2) {
- capture2 = capture2 + 1;
- }
-
- if (who == 3) {
- capture3 = capture3 + 1;
- }
-
- if (who == 4) {
- capture4 = capture4 + 1;
- }
- }
-
- set_timer("hold_scholar", 1);
-
- }
-
- //UPDATE SCORE LIST
- if (who == 1) {
- text_cap1 = real_time(capture1);
- change_objective_text(1, parse("Red time held " + text_cap1));
- } else if (who == 2) {
- text_cap2 = real_time(capture2);
- change_objective_text(2, parse("Blue time held " + text_cap2));
- } else if (who == 3) {
- text_cap3 = real_time(capture3);
- change_objective_text(3, parse("Purple time held " + text_cap3));
- } else if (who == 4) {
- text_cap4 = real_time(capture4);
- change_objective_text(4, parse("Green time held " + text_cap4));
- }
-
- for (nation = num_players; nation > 0; nation--) {
- for (n = num_military_buildings(nation); n > 0; n--) {
- building = find_military_build(nation);
- set_object_health(nation, building, 100);
- }
- }
-
- set_object_health(8, fort_id, 100);
-
- for (nation = num_players; nation > 0; nation--) {
-
- temp_num = any_object_near(nation, 1, x, y, 2) - num_type(nation, "Scholar");
-
- if (temp_num > high_num) {
- high_num = temp_num;
- high_nation = nation;
- }
-
- }
-
- if (high_nation != who) {
- /*if (who == 1) upgrade_level1 = upgrade_level1 - scholar_penalty;
- else if (who == 2) upgrade_level2 = upgrade_level2 - scholar_penalty;
- else if (who == 3) upgrade_level3 = upgrade_level3 - scholar_penalty;
- else if (who == 4) upgrade_level4 = upgrade_level4 - scholar_penalty;*/
- for (nation = num_players; nation > 0; nation--) {
- if (nation == who) nation--;
- if (nation == 0) break;
- if (who != 8) make_peace(who, nation);
- }
- who_is_it = switch_teams(high_nation, who, who_is_it);
- set_unit_scale(high_nation, who_is_it, 4);
- who = high_nation;
- x = object_position_x(who, who_is_it);
- y = object_position_y(who, who_is_it);
- ping_object_all(8, who, who_is_it);
- temp_capture = 0;
-
- if (who == 1) {
- change_objective_text(12, $S("Red has control of the Scholar"));
- print_msg($S("Red has captured the Scholar!"));
- //upgrade_level1 = upgrade_level1 + scholar_penalty;
- } else if (who == 2) {
- change_objective_text(12, $S("Blue has control of the Scholar"));
- print_msg($S("Blue has captured the Scholar!"));
- //upgrade_level2 = upgrade_level1 + scholar_penalty;
- } else if (who == 3) {
- change_objective_text(12, $S("Purple has control of the Scholar"));
- print_msg($S("Purple has captured the Scholar!"));
- //upgrade_level3 = upgrade_level1 + scholar_penalty;
- } else if (who == 4) {
- change_objective_text(12, $S("Green has control of the Scholar"));
- print_msg($S("Green has captured the Scholar!"));
- //upgrade_level4 = upgrade_level1 + scholar_penalty;
- }
- for (nation = num_players; nation > 0; nation--) {
- if (nation == who) nation--;
- if (nation == 0) break;
- declare_war(who, nation);
- }
- }
-
- if (timer_expired("scholar_move_order")) {
- if (is_idle(who, who_is_it)) {
- //x = rand_int(top, bottom);
- //y = rand_int(right, left);
- //set_timer("too_long", 1);
- //while(!map_is_passable(x, y) || !timer_expired("too_long")) {
- // x = rand_int(top, bottom);
- // y = rand_int(right, left);
- //}
- center = get_map_size()/2;
- unit_move_order(who, who_is_it, center, center);
- }
-
- set_timer("scholar_move_order", rand_int(3, 10));
-
- }
-
- x = object_position_x(who, who_is_it);
- y = object_position_y(who, who_is_it);
-
- set_object_health(who, who_is_it, 100);
-
- for (nation = num_players; nation > 0; nation--) {
- clear_reveal_points(nation);
- add_reveal_point(nation, x, y, 15);
- revealed++;
- }
-
- if (num_units_killed(1) >= upgrade_level1) {
- if (age_comparison(1) == 0) {
- new_step1 = upgrade_units(1, step1);
- step1 = new_step1;
- upgrade_level1 = upgrade_level1 + (6 * age(1)) + (step1);
- } else {
- upgrade_level1 = num_units_killed(1) + (6 * age(1)) + step1;
- }
- }
-
- if (num_units_killed(2) >= upgrade_level2) {
- if (age_comparison(2) == 0) {
- new_step2 = upgrade_units(2, step2);
- step2 = new_step2;
- upgrade_level2 = upgrade_level2 + (6 * age(2)) + (step2);
- } else {
- upgrade_level2 = num_units_killed(2) + (6 * age(2)) + step2;
- }
- }
-
- if (num_units_killed(3) >= upgrade_level3) {
- if (age_comparison(3) == 0) {
- new_step3 = upgrade_units(3, step3);
- step3 = new_step3;
- upgrade_level3 = upgrade_level3 + (6 * age(3)) + step3;
- } else {
- upgrade_level3 = num_units_killed(3) + (6 * age(3)) + step3;
- }
- }
-
- if (num_units_killed(4) >= upgrade_level4) {
- if (age_comparison(4) == 0) {
- new_step4 = upgrade_units(4, step4);
- step4 = new_step4;
- upgrade_level4 = upgrade_level4 + (6 * age(4)) + (step4);
- } else {
- upgrade_level4 = num_units_killed(4) + (6 * age(4)) + step4;
- }
- }
-
- x = object_position_x(who, who_is_it);
- y = object_position_y(who, who_is_it);
-
- //for (nation = num_players; nation > 0; nation--) {
- //for (n = num_units(nation); n > 0; n--) {
- //unit = find_unit(nation, "");
- // if (is_idle(nation, unit)) {
- //it_attack_to_order(nation, unit, x, y);
-
- // }
- //}
-
-
- }
-
- int scenario age_comparison( int who ) {
-
- int nation;
- int too_high;
- int num_players;
-
- for (n = 1; n < 8; n++) {
- if (is_defeated(n)) break;
- else num_players++;
- }//num players
-
- who_age = age(who);
-
- for (nation = num_players; nation > 0; nation--) {
- if (nation == who) nation--;
- if (nation == 0) break;
- //if (nation == 5) break;
- nation_age = age(nation);
- if (who_age - nation_age > 1) too_high = 1;
- else too_high = 0;
- }
-
- return too_high;
-
- }
-
- int scenario gain_next_level(int who, int level) {
-
- if (level == 0) {
- gain_tech(who, "The Art of War");
- gain_tech(who, "City State");
- gain_tech(who, "Barter");
- gain_tech(who, "Written Word");
- gain_tech(who, "Classical Age");
- } else if (level == 1) {
- gain_tech(who, "Mercenaries");
- gain_tech(who, "Empire");
- gain_tech(who, "Coinage");
- gain_tech(who, "Mathematics");
- gain_tech(who, "Medieval Age");
- } else if (level == 2) {
- gain_tech(who, "Standing Army");
- gain_tech(who, "Feudalism");
- gain_tech(who, "Trade");
- gain_tech(who, "Chemistry");
- gain_tech(who, "Gunpowder Age");
- } else if (level == 3) {
- gain_tech(who, "Conscription");
- gain_tech(who, "Divine Right");
- gain_tech(who, "Mercantilism");
- gain_tech(who, "Laws of Nature");
- gain_tech(who, "Enlightenment Age");
- } else if (level == 4) {
- gain_tech(who, "Levee en Masse");
- gain_tech(who, "Constitution");
- gain_tech(who, "Finance");
- gain_tech(who, "Electricity");
- gain_tech(who, "Industrial Age");
- } else if (level == 5) {
- gain_tech(who, "Nation-in-Arms");
- gain_tech(who, "Great Power");
- gain_tech(who, "Assembly Line");
- gain_tech(who, "Electronics");
- gain_tech(who, "Modern Age");
- } else if (level == 6) {
- gain_tech(who, "Selective Service");
- gain_tech(who, "International Law");
- gain_tech(who, "Globalization");
- gain_tech(who, "Computerization");
- gain_tech(who, "Information Age");
- }
-
- return age(who);
-
- }
-
-
- String scenario upgrade_units ( int who, int step )
- {
-
- String nation = find_nation(who);
- int nation_age = age(who);
-
- switch(step) {
- case 1:
- gain_next_level(who, nation_age);
- if (nation == "Chinese") gain_upgrade(who, "Fire Lances");
- else if (nation == "Aztecs") gain_upgrade(who, "Xopilli Atl-Atls");
- else gain_upgrade(who, "Elite Javelineers");
- break;
- case 2:
- if (nation == "Germans") gain_upgrade(who, "Vandals");
- else if (nation == "Japanese") gain_upgrade(who, "Elite Bushi");
- else gain_upgrade(who, "Pikemen");
- break;
- case 3:
- if (nation == "British") gain_upgrade(who, "King's Longbowmen");
- else gain_upgrade(who, "Crossbowmen");
- break;
- case 4:
- if (nation == "Egyptians") gain_upgrade(who, "Camel Warrior");
- else if (nation == "Russians") gain_upgrade(who, "Rusiny Lancer");
- else gain_upgrade(who, "Light Cavalry");
- break;
- case 5:
- gain_upgrade(who, "Knight");
- break;
- case 6:
- if (nation == "Egyptians") gain_upgrade(who, "Heavy Chariot");
- else gain_upgrade(who, "Heavy Horse Archer");
- break;
- case 7:
- gain_next_level(who, nation_age);
- if (nation == "Chinese") gain_upgrade(who, "Heavy Fire Lances");
- else gain_upgrade(who, "Arquebusiers");
- if (nation == "British") gain_upgrade(who, "King's Yeomanry");
- break;
- case 8:
- if (nation == "Germans") gain_upgrade(who, "Landsknechts");
- else if (nation == "Japanese") gain_upgrade(who, "Samurai");
- else gain_upgrade(who, "Elite Pikemen");
- break;
- case 9:
- if (nation == "Egyptians") gain_upgrade(who, "Elite Camel Warrior");
- else if (nation == "Russians") gain_upgrade(who, "Cossack");
- else gain_upgrade(who, "Elite Light Cavalry");
- break;
- case 10:
- gain_upgrade(who, "Heavy Knight");
- break;
- case 11:
- if (nation == "Egyptians") gain_upgrade(who, "Mameluke");
- else gain_upgrade(who, "Dragoon");
- break;
- case 12:
- gain_next_level(who, nation_age);
- if (nation == "Chinese") gain_upgrade(who, "Manchu Musketeers");
- else if (nation == "British") gain_upgrade(who, "Highlanders");
- else gain_upgrade(who, "Musketeers");
- break;
- case 13:
- if (nation == "Japanese") gain_upgrade(who, "Gun Samurai");
- else gain_upgrade(who, "Fusiliers");
- break;
- case 14:
- if (nation == "Russians") gain_upgrade(who, "Don Cossack");
- else gain_upgrade(who, "Hussar");
- break;
- case 15:
- gain_upgrade(who, "Cuirassier");
- if (nation == "Egyptians") gain_upgrade(who, "Royal Mameluke");
- else gain_upgrade(who, "Carbineer");
- break;
- case 16:
- gain_next_level(who, nation_age);
- break;
- case 17:
- if (nation == "Chinese") gain_upgrade(who, "Manchu Riflemen");
- else if (nation == "Germans") gain_upgrade(who, "Volksgrenadiers");
- else if (nation == "British") gain_upgrade(who, "Black Watch");
- else gain_upgrade(who, "Riflemen");
- break;
- case 18:
- gain_upgrade(who, "Anti-Tank Rifle");
- gain_upgrade(who, "Armored Car");
- break;
- case 19:
- gain_upgrade(who, "Light Tank");
- break;
- case 20:
- gain_next_level(who, nation_age);
- if (nation == "Chinese") gain_upgrade(who, "Manchu Infantry");
- else if (nation == "Russians") gain_upgrade(who, "Red Guards Infantry");
- else if (nation == "Aztecs") gain_upgrade(who, "Jaguar Infantry");
- else gain_upgrade(who, "Infantry");
- break;
- case 21:
- gain_upgrade(who, "Bazooka");
- break;
- case 22:
- if (nation == "Germans") gain_upgrade(who, "MG42");
- else gain_upgrade(who, "Heavy Machine Gun");
- break;
- case 23:
- gain_upgrade(who, "Armored Scout Car");
- break;
- case 24:
- if (nation == "Germans") gain_upgrade(who, "Leopard Tank");
- else gain_upgrade(who, "Tank");
- break;
- case 25:
- gain_next_level(who, nation_age);
- if (nation == "Russians") gain_upgrade(who, "Shock Infantry");
- else if (nation == "Aztecs") gain_upgrade(who, "Jaguar Assault Infantry");
- else gain_upgrade(who, "Assault Infantry");
- break;
- case 26:
- gain_upgrade(who, "Anti-Tank Missile");
- break;
- case 27:
- gain_upgrade(who, "Advanced Machine Gun");
- break;
- case 28:
- gain_upgrade(who, "Armored Cavalry");
- break;
- case 29:
- if (nation == "Germans") gain_upgrade(who, "Tiger Tank");
- else if (nation == "Russians") gain_upgrade(who, "T80 Tank");
- else gain_upgrade(who, "Main Battle Tank");
- break;
- case 30:
- building = find_military_build(nation);
- x = object_position_x(nation, building);
- y = object_position_y(nation, building);
- create_unit_upgrade(nation, x + 2, y, "attack helicopter", 2);
- break;
- }
-
- step++;
- if (step == 30) step--;
-
- return step;
-
- }
-
- String scenario real_time ( int the_time ) {
-
- int min = the_time/60;
- int sec = the_time%60;
- String time_data;
- int neg;
-
- if (min < 0) {
- neg = 1;
- min = min * -1;
- }
- if (sec < 0) {
- neg = 1;
- sec = sec * -1;
- }
-
- if (sec < 10) {
- time_data = min + ":0" + sec;
- } else {
- time_data = min + ":" + sec;
- }
-
- if (neg == 1) {
- time_data = "-" + time_data;
- }
-
- return time_data;
-
- }