!************************************************************************* !** !** Super Z Trek: Star Trek for the Z Machine !** !** Ported to Inform by John Menichelli !** !************************************************************************* !** The Star Trek game has been around since the dawn of personal computers. !** This version, written in Inform by John Menichelli, is just the latest !** incarnation of this classic game. If you have any questions, comments !** or bug reports, please email them to me at menichel@@0064pixi.com. This !** program and its source code are in the public domain. !** !** This version is based on the C port of an old BASIC program. The C version !** was written by Chris Nystrom and is available from: !** !** http://www.cfi.org/pub/ccn/startrek !** !** You can contact the author of C port at: !** !** Chris Nystrom !** 1013 Prairie Dove Circle !** Austin, Texas 78758 !** !** E-Mail: chris@gnu.ai.mit.edu, nystrom@cactus.org, or ccn@cfi.org !** The original Super Star Trek game comes from the book "BASIC Computer !** Games" edited by David Ahl of Creative Computing fame. It was published !** in 1978 by Workman Publishing, 1 West 39 Street, New York, New York, !** and the ISBN is: 0-89489-052-3. !** !** Here is the original BASIC header: !** !** SUPER STARTREK - MAY 16, 1978 - REQUIRES 24K MEMORY !** !** **** STAR TREK **** **** !** SIMULATION OF A MISSION OF THE STARSHIP ENTERPRISE, !** AS SEEN ON THE STAR TREK TV SHOW. !** ORIGINAL PROGRAM BY MIKE MAYFIELD, MODIFIED VERSION !** PUBLISHED IN DEC'S "101 BASIC GAMES", BY DAVE AHL. !** MODIFICATIONS TO THE LATTER (PLUS DEBUGGING) BY BOB !** LEEDOM - APRIL & DECEMBER 1974, !** WITH A LITTLE HELP FROM HIS FRIENDS . . . !** COMMENTS, EPITHETS, AND SUGGESTIONS SOLICITED -- !** SEND TO: R. C. LEEDOM !** WESTINGHOUSE DEFENSE & ELECTRONICS SYSTEMS CNTR. !** BOX 746, M.S. 338 !** BALTIMORE, MD 21203 !** !** CONVERTED TO MICROSOFT 8 K BASIC 3/16/78 BY JOHN BORDERS !** LINE NUMBERS FROM VERSION STREK7 OF 1/12/75 PRESERVED AS !** MUCH AS POSSIBLE WHILE USING MULTIPLE STATMENTS PER LINE !** !** Notes on the Inform version: !** !** Since Inform only works with integers, this version eliminates the !** guesswork involved in moving and firing torpedoes. To make up for !** this, the torpedo algorithm gives the torped a random chance to miss, !** which increases as the range increases. !** Constants Constant MAX_TORPS 10; Constant KLINGON_POWER 200; Constant MAX_POWER 3000; Constant SCREEN_SIZE 6; Constant ENTERPRISE 1; Constant KLINGON 2; Constant BASE 3; Constant STAR 4; Constant WARP_ENGINES 0; Constant SHORT_RANGE 1; Constant LONG_RANGE 2; Constant PHASER_CONTROL 3; Constant PHOTON_TUBES 4; Constant DAMAGE_CONTROL 5; Constant SHIELD_CONTROL 6; Constant LIBRARY_COMPUTER 7; !** Global Variables Global trek_docked_flag; ! 1 or 2 if Enterprise is docked Global trek_current_energy; ! Current energy Global trek_shield_value; ! Current shield value Global trek_torp_capacity = MAX_TORPS; ! Photon torpedo capacity Global trek_torps_remaining; ! Photon torpedoes left Global trek_max_speed; ! Maximum allowed speed Global trek_end_of_time; ! End of time/game Global trek_current_date; ! Current stardate Global trek_total_bases; ! Total starbases Global trek_total_klingons; ! Klingons at start Global trek_klingons_left; ! Total Klingons left Global trek_quadrant_position; ! These two variables are used Global trek_sector_position; ! to calculate the quadrant and ! sector location of the Enterprise !** Arrays Array trek_long_range_galaxy --> 64; ! Holds long range scan data Array trek_galaxy_history --> 64; ! Hold history of all long and short ! range scans Array trek_temp_array --> 64; ! Used for printing long range scans Array trek_sector -> 64; ! Sector data array Array trek_damage_array -> 8; ! Damage Array Array trek_klingon_array -> 3; ! Array used to track Klingon damage; Array text_array -> 60; ! Input array for keyboard entry Array CourseMapping -> 0 6 5 4 7 0 3 8 1 2; ! Main Program [ Main ; PlayTrek(); ]; [ PlayTrek ; TrekIntro(); Initialize(); EndScreen(); ]; [ TrekIntro ; font off; box "************************************" "* *" "* *" "* * * Super Z Trek * * *" "* *" "* *" "************************************"; print "^^^"; spaces (0->33)/2 - 12; print "Appuyez sur une touche pour commencer..."; Pause(); ]; [ Initialize i j bases stars klingons; ! Initialize time trek_current_date = (20 + random(10)) * 1000; trek_end_of_time = (25 + random(10)) * 10; ! Setup What Exists in Galaxy for (i = 0: i < 64: i++) trek_galaxy_history-->i = 999; for (i = 0: i < 64: i++) { j = random(100); switch(j) { 98 to 99: klingons = 3; 95 to 97: klingons = 2; 81 to 94: klingons = 1; default: klingons = 0; } trek_klingons_left = trek_klingons_left + klingons; if (random(100) > 96) bases = 1; else bases = 0; trek_total_bases = trek_total_bases + bases; stars = random(8); trek_long_range_galaxy-->i = (klingons * 100) + (bases * 10) + stars; } if (trek_total_bases == 0) { i = random(64) - 1; j = trek_long_range_galaxy-->i; j = j + 10; trek_long_range_galaxy-->i = j; trek_total_bases++; } if (trek_klingons_left > trek_end_of_time / 10) trek_end_of_time = (trek_klingons_left + 1) * 10; trek_total_klingons = trek_klingons_left; ! Initialize Enterprise trek_docked_flag = 0; trek_current_energy = MAX_POWER; trek_torps_remaining = trek_torp_capacity; trek_shield_value = 0; trek_max_speed = 8; trek_quadrant_position = random(64) - 1; trek_sector_position = random(64) - 1; for (i = 0: i < 8: i++) trek_damage_array->i = 5; MissionBrief(); SetScreen(); NewQuadrant(); UpdateStatus(); ShortRangeScan(); MainMenu(); ]; [ NewQuadrant i j k b s ; trek_galaxy_history-->trek_quadrant_position = trek_long_range_galaxy-->trek_quadrant_position; for (i = 0: i < 3: i++) trek_klingon_array->i = KLINGON_POWER; i = trek_long_range_galaxy-->trek_quadrant_position; k = i / 100; ! Klingons b = i / 10 - (10 * k); ! Bases s = i - (100 * k) - (10 * b); ! Stars for (i = 0: i < 64: i++) trek_sector->i = 0; trek_sector->trek_sector_position = ENTERPRISE; for (i = 1: i <= k: i++) ! Position Klingons { .Retry1; j = random(64) - 1; if (trek_sector->j ~= 0) jump Retry1; else trek_sector->j = KLINGON; } for (i = 1: i <= b: i++) ! Position base { .Retry2; j = random(64) - 1; if (trek_sector->j ~= 0) jump Retry2; else trek_sector->j = BASE; } for (i = 1: i <= s: i++) ! Position stars { .Retry3; j = random(64) - 1; if (trek_sector->j ~= 0) jump Retry3; else trek_sector->j = STAR; } ]; [ SetScreen i j; @erase_window $ffff; @split_window SCREEN_SIZE; @set_window 1; style reverse; j = SCREEN_SIZE; for (i = 1 : i <= j: i++) { @set_cursor i 1; spaces (0->33)-1; } style roman; ]; [ MissionBrief ; @erase_window $ffff; new_line; new_line; print "A: Capitaine, USS Entreprise, NCC-1701^^"; print "De: Commande Starfleet^^"; print "Sujet: Avertissement de Guerre^^"; print "1. Il y a approximativement trois heures, Les vaisseaux de guerre Impériaux de la Marine Empire Klingon ont croisé la frontière dans l'espace de la Fédération. Ces navires ont détruit tous les avant-postes et les bateaux sur leur chemin et n'ont pas répondu de leur acte..^^"; print "2. Donc, immédiatement effective, un état de guerre existe entre la planète de la Fédération Unie et l'Empire Klingon Impérial.^^"; print "3. Comme l'Entreprise est le seul navire disponible dans cette partie de la galaxie, vos ordres sont comme suit:^^"; print "4. Engagez-vous et détruisez chacun et tous les navires Klingon que vous rencontrez Dans votre zone de patrouille. Le scanner à longue portée indique un total de ", trek_klingons_left, " vaisseaux de guerre Klingon dans votre zone.^^"; print "5. Les Opérations Starfleet calcule qu'il prendra approximativement ", trek_end_of_time / 10, " jours pour mobiliser notre forces et commencez à envoyer des renforts au front. Nous avons besoin de vous pour tenir à distance l'envahissement des flottes Klingon jusqu'à ce que ces renforts arrivent.^^"; print "6. Bonne chance et bonne chasse.^^"; print "[Pressez une touche pour accepter la mission]"; Pause(); ]; [ UpdateStatus i; @set_window 1; @set_cursor 1 1; style reverse; for (i = 1: i <= 2: i++) { @set_cursor i 1; spaces (0->33)-1; } @set_cursor 1 1; print "Date Courante: Jours Restants:^"; print "Klingons Restants: Bases Restantes:^"; print "Val Bouclier: Energie Restante:^^"; print "1: Nav 2: SCP 3: SLP 4: Phaser 5: Torp^"; print "6: Boucli 7: Dégâts 8: Biblio 9: Aide 0: Quit"; @set_cursor 1 15; print (trek_current_date / 10), ".", (trek_current_date % 10); if (trek_end_of_time < 100) @set_cursor 1 50; else @set_cursor 1 49; print trek_end_of_time / 10, ".", trek_end_of_time % 10; @set_cursor 2 21; print trek_klingons_left; @set_cursor 2 52; print trek_total_bases; @set_cursor 3 15; print trek_shield_value; i = trek_current_energy + trek_shield_value; @set_cursor 3 49; switch(i) { 0 to 9 : print " ", i; 10 to 99 : print " ", i; 100 to 999 : print " ", i; default : print i; } style roman; @set_window 0; ]; [ MainMenu i ; for (::) { @read_char 1 -> i; switch(i) { '0' : break; '1' : CourseControl(); '2' : ShortRangeScan(); '3' : LongRangeScan(); '4' : PhaserControl(); '5' : PhotonTorps(); '6' : ShieldControl(); '7' : DamageControl(); '8' : Library(); '9' : Help(); } if (i == '0') break; } ]; [ CourseControl i course speed; PrintCompass(); print "^Entrer trajet (1-9): "; @read_char 1 -> i; if (i < '1' || i > '9' || i=='5') "^Lt. Sulu rapports: ~Donnée de trajet incorrecte, monsieur!~^"; course = i - 48; print course; course=CourseMapping->course; trek_max_speed = trek_damage_array->WARP_ENGINES; trek_max_speed = trek_max_speed + 3; print "^^Entrez la vitesse de navigation (1-", trek_max_speed, "): "; @read_char 1 -> i; speed = i - 48; if (speed < 1) "^Lt. Sulu rapports: ~Vitesse incorrecte, monsieur!~^^"; if (speed > trek_max_speed) "^Ingénieur en chef Scott annonce: ~Les moteurs ne peuvent naviguer pas plus de ", trek_max_speed, "!~^^"; if (speed * 10 > trek_current_energy + trek_shield_value) "^Ingénieur en chef Scott annonce: ~Nous n'avons pas assez de puissance d'énergie pour aller à cette vitesse!~^^"; trek_current_energy = trek_current_energy - (speed * 10); print speed, "^^"; if (trek_current_energy < 0) { print "^Le contrôle du bouclier fournit l'énergie pour achever la manoeuvre.^"; trek_shield_value = trek_shield_value + trek_current_energy; trek_current_energy = 0; if (trek_shield_value < 0) trek_shield_value = 0; } CompleteManeuver(course, speed); if (trek_current_energy + trek_shield_value <= 0) OutOfEnergy(); ]; [ CompleteManeuver course speed i j xs ys xq yq; xs = (trek_sector_position % 8) + 1; ys = 8 - (trek_sector_position / 8); xq = (trek_quadrant_position % 8) + 1; yq = 8 - (trek_quadrant_position / 8); j = trek_sector_position; for (i = 1: i <= speed: i++) { if (OutOfBounds(course) == 1) { print "^Le déplacement a échoué - Vous ne pouvez pas partir de votre secteur de patrouille.^"; break; } switch(course) { 1: ys++; 2: xs++; ys++; 3: xs++; 4: xs++; ys--; 5: ys--; 6: ys--; xs--; 7: xs--; 8: xs--; ys++; } if (xs < 1 || xs > 8 || ys < 1 || ys > 8) { if (xs < 1) { xs = 8; xq--; } if (xs > 8) { xs = 1; xq++; } if (ys < 1) { ys = 8; yq--; } if (ys > 8) { ys = 1; yq++; } j = (8 * (8 - ys)) + xs - 1; trek_sector_position = j; trek_quadrant_position = (8 * (8 - yq)) + xq - 1; if (trek_docked_flag > 0) trek_docked_flag = 0; NewQuadrant(); } else { j = (8 * (8 - ys)) + xs - 1; if (trek_sector->j == KLINGON or STAR) ! You can pass through a base { print "^Le déplacement a échoué en raison de la navigation incorrecte.^"; break; } if (trek_sector->j == BASE) { if (i == speed) { print "^L'Entreprise est maintenant amarrée.^"; trek_docked_flag = 1; trek_sector->trek_sector_position = 0; trek_sector_position = j; ! jump DoneMoving; } else continue; } else { trek_sector->j = ENTERPRISE; if (trek_docked_flag > 0) { trek_docked_flag = 0; trek_sector->trek_sector_position = BASE; } else trek_sector->trek_sector_position = 0; trek_sector_position = j; } } } !.DoneMoving; trek_current_date = trek_current_date + speed; trek_end_of_time = trek_end_of_time - speed; if (trek_end_of_time <= 0) EndOfTime(); UpdateStatus(); DamageRepair(); UpdateStatus(); ShortRangeScan(); ]; [ OutOfBounds course xs ys xq yq; xs = (trek_sector_position % 8) + 1; ys = 8 - (trek_sector_position / 8); xq = (trek_quadrant_position % 8) + 1; yq = 8 - (trek_quadrant_position / 8); if (xq == 1 && yq == 1 && xs == 1 && ys == 1) ! Lower left corner { if (course == 4 or 5 or 6 or 7 or 8) return 1; else return 0; } if (xq == 8 && yq == 8 && xs == 8 && ys == 8) ! Upper right corner { if (course == 1 or 2 or 3 or 4 or 8) return 1; else return 0; } if (xq == 8 && yq == 1 && xs == 8 && ys == 1) ! Lower right corner { if (course == 2 or 3 or 4 or 5 or 6) return 1; else return 0; } if (xq == 1 && yq == 8 && xs == 1 && ys == 8) ! Upper left corner { if (course == 1 or 2 or 6 or 7 or 8) return 1; else return 0; } if (xq == 1 && xs == 1) ! Left edge { if (course == 6 or 7 or 8) return 1; else return 0; } if (xq == 8 && xs == 8) ! Right Edge { if (course == 2 or 3 or 4) return 1; else return 0; } if (yq == 8 && ys == 8) ! Top edge { if (course == 1 or 2 or 8) return 1; else return 0; } if (yq == 1 && ys == 1) ! Bottom edge { if (course == 4 or 5 or 6) return 1; else return 0; } return 0; ]; [ PrintCompass ; new_line; print " 7 8 9^"; print " @@0092 | /^"; print "4 -+- 6^"; print " / | @@0092^"; print " 1 2 3^"; ]; [ ShortRangeScan x y ; if (trek_damage_array->SHORT_RANGE < 5) "^Scanner Courte Portée inopérants.^"; ! Determine Quadrant x = (trek_quadrant_position % 8) + 1; y = 8 - (trek_quadrant_position / 8); print "^Zone du Scanner Courte Portée "; print x, ", ", y, " ("; PrintQuadrantName(x, y); print ")^^"; print " 1 2 3 4 5 6 7 8^"; print " --- --- --- --- --- --- --- ---^"; for (x = 0: x < 64: x++) { if (x % 8 == 0) { print " "; print 8 - (x/8); print ":"; } switch (trek_sector->x) { 0 : print " . "; 1 : print " +E+"; 2 : print " +K+"; 3 : if (trek_docked_flag == 0) print " >B<"; else print " >D<"; 4 : print " # "; } if ((x + 1) % 8 == 0) print "^"; } y = 0; for (x = 1: x < 64: x++) if (trek_sector->x == 2) y++; print "^Condition Alerte: "; if (y > 0) print "Rouge^"; else if (trek_current_energy * 10 < MAX_POWER) print "jaune^"; else print "Vert^"; ]; [ LongRangeScan i j temp_pos; if (trek_damage_array->LONG_RANGE < 5) "^Scanner Longue Portée inopérants.^"; for (i = 0: i < 64: i++) trek_temp_array-->i = 999; temp_pos = trek_quadrant_position; if (temp_pos == 0) ! Upper left { trek_temp_array-->0 = trek_long_range_galaxy-->0; trek_temp_array-->1 = trek_long_range_galaxy-->1; trek_temp_array-->8 = trek_long_range_galaxy-->8; trek_temp_array-->9 = trek_long_range_galaxy-->9; trek_galaxy_history-->0 = trek_long_range_galaxy-->0; trek_galaxy_history-->1 = trek_long_range_galaxy-->1; trek_galaxy_history-->8 = trek_long_range_galaxy-->8; trek_galaxy_history-->9 = trek_long_range_galaxy-->9; jump Printit; } if (temp_pos == 7) ! Upper right { trek_temp_array-->6 = trek_long_range_galaxy-->6; trek_temp_array-->7 = trek_long_range_galaxy-->7; trek_temp_array-->14 = trek_long_range_galaxy-->14; trek_temp_array-->15 = trek_long_range_galaxy-->15; trek_galaxy_history-->6 = trek_long_range_galaxy-->6; trek_galaxy_history-->7 = trek_long_range_galaxy-->7; trek_galaxy_history-->14 = trek_long_range_galaxy-->14; trek_galaxy_history-->15 = trek_long_range_galaxy-->15; jump Printit; } if (temp_pos == 56) ! Lower left { trek_temp_array-->48 = trek_long_range_galaxy-->48; trek_temp_array-->49 = trek_long_range_galaxy-->49; trek_temp_array-->56 = trek_long_range_galaxy-->56; trek_temp_array-->57 = trek_long_range_galaxy-->57; trek_galaxy_history-->48 = trek_long_range_galaxy-->48; trek_galaxy_history-->49 = trek_long_range_galaxy-->49; trek_galaxy_history-->56 = trek_long_range_galaxy-->56; trek_galaxy_history-->57 = trek_long_range_galaxy-->57; jump Printit; } if (temp_pos == 63) ! Lower right { trek_temp_array-->54 = trek_long_range_galaxy-->54; trek_temp_array-->55 = trek_long_range_galaxy-->55; trek_temp_array-->62 = trek_long_range_galaxy-->62; trek_temp_array-->63 = trek_long_range_galaxy-->63; trek_galaxy_history-->54 = trek_long_range_galaxy-->54; trek_galaxy_history-->55 = trek_long_range_galaxy-->55; trek_galaxy_history-->62 = trek_long_range_galaxy-->62; trek_galaxy_history-->63 = trek_long_range_galaxy-->63; jump Printit; } if (temp_pos < 8) ! Top edge { trek_temp_array-->temp_pos = trek_long_range_galaxy-->temp_pos; trek_temp_array-->(temp_pos-1) = trek_long_range_galaxy-->(temp_pos-1); trek_temp_array-->(temp_pos+1) = trek_long_range_galaxy-->(temp_pos+1); trek_temp_array-->(temp_pos+7) = trek_long_range_galaxy-->(temp_pos+7); trek_temp_array-->(temp_pos+8) = trek_long_range_galaxy-->(temp_pos+8); trek_temp_array-->(temp_pos+9) = trek_long_range_galaxy-->(temp_pos+9); trek_galaxy_history-->temp_pos = trek_long_range_galaxy-->temp_pos; trek_galaxy_history-->(temp_pos-1) = trek_long_range_galaxy-->(temp_pos-1); trek_galaxy_history-->(temp_pos+1) = trek_long_range_galaxy-->(temp_pos+1); trek_galaxy_history-->(temp_pos+7) = trek_long_range_galaxy-->(temp_pos+7); trek_galaxy_history-->(temp_pos+8) = trek_long_range_galaxy-->(temp_pos+8); trek_galaxy_history-->(temp_pos+9) = trek_long_range_galaxy-->(temp_pos+9); jump Printit; } if (temp_pos > 55) ! Bottom edge { trek_temp_array-->temp_pos = trek_long_range_galaxy-->temp_pos; trek_temp_array-->(temp_pos-1) = trek_long_range_galaxy-->(temp_pos-1); trek_temp_array-->(temp_pos+1) = trek_long_range_galaxy-->(temp_pos+1); trek_temp_array-->(temp_pos-7) = trek_long_range_galaxy-->(temp_pos-7); trek_temp_array-->(temp_pos-8) = trek_long_range_galaxy-->(temp_pos-8); trek_temp_array-->(temp_pos-9) = trek_long_range_galaxy-->(temp_pos-9); trek_galaxy_history-->temp_pos = trek_long_range_galaxy-->temp_pos; trek_galaxy_history-->(temp_pos-1) = trek_long_range_galaxy-->(temp_pos-1); trek_galaxy_history-->(temp_pos+1) = trek_long_range_galaxy-->(temp_pos+1); trek_galaxy_history-->(temp_pos-7) = trek_long_range_galaxy-->(temp_pos-7); trek_galaxy_history-->(temp_pos-8) = trek_long_range_galaxy-->(temp_pos-8); trek_galaxy_history-->(temp_pos-9) = trek_long_range_galaxy-->(temp_pos-9); jump Printit; } if (temp_pos % 8 == 0) ! Left edge { trek_temp_array-->temp_pos = trek_long_range_galaxy-->temp_pos; trek_temp_array-->(temp_pos-8) = trek_long_range_galaxy-->(temp_pos-8); trek_temp_array-->(temp_pos+8) = trek_long_range_galaxy-->(temp_pos+8); trek_temp_array-->(temp_pos-7) = trek_long_range_galaxy-->(temp_pos-7); trek_temp_array-->(temp_pos+1) = trek_long_range_galaxy-->(temp_pos+1); trek_temp_array-->(temp_pos+9) = trek_long_range_galaxy-->(temp_pos+9); trek_galaxy_history-->temp_pos = trek_long_range_galaxy-->temp_pos; trek_galaxy_history-->(temp_pos-8) = trek_long_range_galaxy-->(temp_pos-8); trek_galaxy_history-->(temp_pos+8) = trek_long_range_galaxy-->(temp_pos+8); trek_galaxy_history-->(temp_pos-7) = trek_long_range_galaxy-->(temp_pos-7); trek_galaxy_history-->(temp_pos+1) = trek_long_range_galaxy-->(temp_pos+1); trek_galaxy_history-->(temp_pos+9) = trek_long_range_galaxy-->(temp_pos+9); jump Printit; } if ((temp_pos+1) % 8 == 0) ! Right edge { trek_temp_array-->temp_pos = trek_long_range_galaxy-->temp_pos; trek_temp_array-->(temp_pos-8) = trek_long_range_galaxy-->(temp_pos-8); trek_temp_array-->(temp_pos+8) = trek_long_range_galaxy-->(temp_pos+8); trek_temp_array-->(temp_pos+7) = trek_long_range_galaxy-->(temp_pos+7); trek_temp_array-->(temp_pos-1) = trek_long_range_galaxy-->(temp_pos-1); trek_temp_array-->(temp_pos-9) = trek_long_range_galaxy-->(temp_pos-9); trek_galaxy_history-->temp_pos = trek_long_range_galaxy-->temp_pos; trek_galaxy_history-->(temp_pos-8) = trek_long_range_galaxy-->(temp_pos-8); trek_galaxy_history-->(temp_pos+8) = trek_long_range_galaxy-->(temp_pos+8); trek_galaxy_history-->(temp_pos+7) = trek_long_range_galaxy-->(temp_pos+7); trek_galaxy_history-->(temp_pos-1) = trek_long_range_galaxy-->(temp_pos-1); trek_galaxy_history-->(temp_pos-9) = trek_long_range_galaxy-->(temp_pos-9); jump Printit; } ! Everything else trek_temp_array-->temp_pos = trek_long_range_galaxy-->temp_pos; trek_temp_array-->(temp_pos-9) = trek_long_range_galaxy-->(temp_pos-9); trek_temp_array-->(temp_pos-8) = trek_long_range_galaxy-->(temp_pos-8); trek_temp_array-->(temp_pos-7) = trek_long_range_galaxy-->(temp_pos-7); trek_temp_array-->(temp_pos-1) = trek_long_range_galaxy-->(temp_pos-1); trek_temp_array-->(temp_pos+1) = trek_long_range_galaxy-->(temp_pos+1); trek_temp_array-->(temp_pos+7) = trek_long_range_galaxy-->(temp_pos+7); trek_temp_array-->(temp_pos+8) = trek_long_range_galaxy-->(temp_pos+8); trek_temp_array-->(temp_pos+9) = trek_long_range_galaxy-->(temp_pos+9); trek_galaxy_history-->temp_pos = trek_long_range_galaxy-->temp_pos; trek_galaxy_history-->(temp_pos-9) = trek_long_range_galaxy-->(temp_pos-9); trek_galaxy_history-->(temp_pos-8) = trek_long_range_galaxy-->(temp_pos-8); trek_galaxy_history-->(temp_pos-7) = trek_long_range_galaxy-->(temp_pos-7); trek_galaxy_history-->(temp_pos-1) = trek_long_range_galaxy-->(temp_pos-1); trek_galaxy_history-->(temp_pos+1) = trek_long_range_galaxy-->(temp_pos+1); trek_galaxy_history-->(temp_pos+7) = trek_long_range_galaxy-->(temp_pos+7); trek_galaxy_history-->(temp_pos+8) = trek_long_range_galaxy-->(temp_pos+8); trek_galaxy_history-->(temp_pos+9) = trek_long_range_galaxy-->(temp_pos+9); .Printit; new_line; new_line; print " Résultats Scanner Longue Portée^^"; print " 1 2 3 4 5 6 7 8^"; print " ----- ----- ----- ----- ----- ----- ----- -----^"; for (i = 0: i < 64: i++) { if (i%8 == 0) { print " "; print 8 - i/8; print ":"; } j = trek_temp_array-->i; print " "; if (i == temp_pos) style reverse; else style roman; switch(j) { 0 to 9 : print " 00"; print j; 10 to 98 : print " 0"; print j; 999 : print " ***"; default : print " "; print j; } print " "; style roman; if (i%8 == 7) print "^"; } ]; [ TextToNumber n x len mul tot; text_array -> 0 = 60; read text_array 0; if (text_array->1 > 4) return -1; x = 0; len = text_array->1; if (len == 4) mul=1000; if (len == 3) mul=100; if (len == 2) mul=10; if (len == 1) mul=1; tot = 0; for (n = 0: n < len: n++) { if (text_array->(n+2) > 47 && text_array->(n+2) < 58) { x = text_array->(n+2); x = x - 48; tot = tot + mul * x; mul = mul/10; } else return -1; } return tot; ]; [ PhaserControl i j k x1 y1 x2 y2 z rng dmg; if (trek_damage_array->PHASER_CONTROL < 5) "^Officier scientifique Spock annonce: ~Les phasers sont inopérants, Capitaine.~^"; k = trek_long_range_galaxy-->trek_quadrant_position; k = k / 100; ! Klingons if (k == 0) "^Officier scientifique Spock annonce: ~Les scanners ne montrent aucun vaisseau ennemi dans ce quart de cercle~^"; if (trek_damage_array->LIBRARY_COMPUTER < 5) print "^Officier scientifique Spock annonce: ~L'ordinateur est endomagé cela gênera l'exactitude, Capitaine.~^"; print "^Phasers verrouillé sur cible. Énergie disponible = ", trek_current_energy + trek_shield_value; print "^Entrez un numéro d'unités pour tirer: "; i = TextToNumber(); if (i <= 0) "^Officier scientifique Spock annonce: ~Le tir du Phaser a échoué.~^"; if (i > trek_current_energy) "^Officier scientifique Spock annonce: ~Énergie insuffisante pour cette attaque.~^"; trek_current_energy = trek_current_energy - i; if (trek_damage_array->LIBRARY_COMPUTER < 5) ! Computer damage affects targeting i = i * trek_damage_array->LIBRARY_COMPUTER / 5; i = i / k; ! Divide the energy between each target x1 = (trek_sector_position % 8) + 1; y1 = 8 - (trek_sector_position / 8); k = -1; for (j = 0: j < 64: j++) { if (trek_sector->j == KLINGON) { k++; x2 = (j % 8) + 1; y2 = 8 - (j / 8); rng = Range(x1, y1, x2, y2); dmg = i; dmg = dmg * 10 / (rng + random(5) - 1); z = trek_klingon_array->k; if (dmg <= 0) "^Officier scientifique Spock annonce: ~Les scanners ne montrent aucun dégât sur le vaisseau de guerre Klingon ", x2, ", ", y2, ".~^"; if (dmg >= z) { print "^Officier scientifique Spock annonce: ~Le vaisseau de guerre Klingon ", x2, ", ", y2, " est bien détruit.~^"; trek_klingon_array->k = 0; trek_sector->j = 0; trek_klingons_left--; if (trek_klingons_left == 0) WonGame(); z = trek_long_range_galaxy-->trek_quadrant_position; z = z - 100; trek_long_range_galaxy-->trek_quadrant_position = z; if (z / 100 == 0) ShortRangeScan(); UpdateStatus(); } else { z = z - dmg; trek_klingon_array->k = z; print "^Officier scientifique Spock annonce: ~Les scanners montrent que le vaisseau de guerre Klingon ", x2, ", ", y2, " a subit ", dmg, " en coup d'unité.~^"; } } } KlingonsShoot(); ]; [ PhotonTorps course i x1 y1 x2 y2 z index ; if (trek_torps_remaining == 0) "^Commandant Chekov annonce: ~Toutes les torpilles de photon sont dépensées, monsieur!~^"; if (trek_damage_array->PHOTON_TUBES < 5) "^Commandant Chekov annonce: ~Tubes de torpille de photon non opérationnels, monsieur!~^"; i = trek_long_range_galaxy-->trek_quadrant_position; i = i / 100; ! Klingons if (i == 0) "^Commandant Chekov annonce: ~Il n'y a pas de Klingons dans cette zone, monsieur!~^"; trek_torps_remaining--; x1 = (trek_sector_position % 8) + 1; y1 = 8 - (trek_sector_position / 8); PrintCompass(); print "^Entrez la destination de la torpille (1-9): "; @read_char 1 -> i; if (i < '1' || i > '9' || i=='5' ) "^Commandant Chekov annonce: ~Données incorrectes, monsieur!~^"; course = i - 48; print course, "^"; course=CourseMapping->course; for (i = 1: i < 8: i++) { switch(course) { 1: y1++; 2: x1++; y1++; 3: x1++; 4: x1++; y1--; 5: y1--; 6: y1--; x1--; 7: x1--; 8: x1--; y1++; } if (x1 < 1 || x1 > 8 || y1 < 1 || y1 > 8) { print "^Commandant Chekov annonce: ~La torpille a manqué sa cible, monsieur!~^"; break; } index = (8 * (8 - y1)) + x1 - 1; if (trek_sector->index == KLINGON) { x2 = (trek_sector_position % 8) + 1; y2 = 8 - (trek_sector_position / 8); z = Range(x1, y1, x2, y2); z = z / 15; if (random(10) - 1 < z) { print "^Commandant Chekov annonce: ~La torpille a manqué sa cible, monsieur!~^"; break; } else { trek_sector->index = 0; trek_klingons_left--; if (trek_klingons_left == 0) WonGame(); z = trek_long_range_galaxy-->trek_quadrant_position; z = z - 100; trek_long_range_galaxy-->trek_quadrant_position = z; print "^Commandant Chekov annonce: ~Le vaisseau de guerre Klingon dans le secteur ", x2, ", ", y2, " est bien détruit, monsieur!~^"; UpdateStatus(); ShortRangeScan(); break; } } if (trek_sector->index == BASE) { print "^Commandant Chekov annonce: ~Vous avez détruit une base, monsieur!~^"; trek_total_bases--; z = trek_long_range_galaxy-->trek_quadrant_position; z = z - 10; trek_long_range_galaxy-->trek_quadrant_position = z; if (trek_total_bases == 0 && trek_klingons_left <= (trek_current_date / 10) - trek_end_of_time / 10) { print "C'est fait, Capitaine!! Vous êtes par la présente relevé de vos fonctions et condamné à 99 années lumière de travaux forcés sur Cygnus 12!! "; LoseGame(); } if (trek_docked_flag > 0) ! Undock { trek_docked_flag = 0; trek_sector->trek_sector_position = ENTERPRISE; ShortRangeScan(); } break; } if (trek_sector->index == STAR) { print "^Commandant Chekov annonce: ~L'étoile a absorbé l'énergie de la torpille, monsieur!~^"; break; } } KlingonsShoot(); ]; [ DamageControl ; new_line; new_line; print "Système Statut^"; print "-------------------------------------^"; print "Préjudice moteur "; if (trek_damage_array->WARP_ENGINES == 5) print "Opérationnel^"; else print "Endommagé^"; print "Scanner Courte Portée "; if (trek_damage_array->SHORT_RANGE == 5) print "Opérationnel^"; else print "Endommagé^"; print "Scanner Longue Portée "; if (trek_damage_array->LONG_RANGE == 5) print "Opérationnel^"; else print "Endommagé^"; print "Contrôle Phaser "; if (trek_damage_array->PHASER_CONTROL == 5) print "Opérationnel^"; else print "Endommagé^"; print "Tubes de Torpille de Photon "; if (trek_damage_array->PHOTON_TUBES == 5) print "Opérationnel^"; else print "Endommagé^"; print "Contrôle Dégâts "; if (trek_damage_array->DAMAGE_CONTROL == 5) print "Opérationnel^"; else print "Endommagé^"; print "Contrôle Bouclier "; if (trek_damage_array->SHIELD_CONTROL == 5) print "Opérationnel^"; else print "Endommagé^"; print "Bibliothèque de L'ordinateur "; if (trek_damage_array->LIBRARY_COMPUTER == 5) print "Opérationnel^"; else print "Endommagé^"; ]; [ ShieldControl i; if (trek_damage_array->SHIELD_CONTROL < 5) "Contrôle Bouclier inopérant."; print "^Énergie totale disponible = ", trek_current_energy + trek_shield_value; print "^Entrez un numéro d'unités pour le bouclier: "; i = TextToNumber(); if (i == -1) "^Rapport Contrôle Bouclier: ~Requête invalide - Bouclier inchangé.~^"; if (i == trek_shield_value) "^^"; if (i >= trek_current_energy + trek_shield_value) "^Rapport Contrôle Bouclier: ~Énergie disponible insuffisante - Bouclier inchangé.~^"; trek_current_energy = trek_current_energy + trek_shield_value - i; trek_shield_value = i; print "^Rapport Contrôle Bouclier: ~Valeur Bouclier ", trek_shield_value, " unités de votre commande.~^"; UpdateStatus(); ]; [ Library i; if (trek_damage_array->LIBRARY_COMPUTER < 5) "^Bibliothèque d'ordinateur inopérante.^"; print "^Choisissez quel fonction de bibliothèque d'ordinateur vous voulez utiliser:^^"; print "1: Record Galactique^"; print "2: Rapport de Statut^"; print "3: Sortie^^"; print "Entrez votre choix: "; @read_char 1 -> i; print i - 48, "^"; switch(i) { '1' : GalacticRecord(); '2' : StatusReport(); '3' : "^Sortie de Bibliothèque d'ordinateur.^^"; default: "^Choix invalide.^"; } ]; [ GalacticRecord i j; new_line; new_line; print " La Galaxie^^"; print " 1 2 3 4 5 6 7 8^"; print " ----- ----- ----- ----- ----- ----- ----- -----^"; for (i = 0: i < 64: i++) { if (i%8 == 0) { print " "; print 8 - i/8; print ":"; } j = trek_galaxy_history-->i; print " "; if (i == trek_quadrant_position) style reverse; else style roman; switch(j) { 0 to 9 : print " 00"; print j; 10 to 98 : print " 0"; print j; 999 : print " ***"; default : print " "; print j; } print " "; style roman; if (i%8 == 7) print "^"; } ]; [ StatusReport i j x y; for (i = 1: i < 64: i++) if (trek_sector->i == KLINGON) j++; print "^Rapport de Statut:^^"; print "Date: ", (trek_current_date / 10), ".", (trek_current_date % 10), "^^"; print "Temps restant pour la mission: ", trek_end_of_time / 10, ".", trek_end_of_time % 10, " jours^^"; x = (trek_quadrant_position % 8) + 1; y = 8 - (trek_quadrant_position / 8); print "Position:^^"; print " Zone: ", x, ", ", y, " ("; PrintQuadrantName(x, y); print ")^^"; x = (trek_sector_position % 8) + 1; y = 8 - (trek_sector_position / 8); print " Secteur: ", x, ", ", y, "^^"; print "Condition d'alerte: "; if (j > 0) print "Rouge^^"; else if (trek_current_energy * 10 < MAX_POWER) print "Jaune^^"; else print "Verte^^"; print "Vaisseau de guerre Klingon restant: ", trek_klingons_left, "^^"; print "Bases totales restantes: ", trek_total_bases, "^^"; print "Totale énergie restante: ", trek_current_energy + trek_shield_value, "^^"; print "Réglage actuel du bouclier: ", trek_shield_value, "^^"; print "Totales torpilles restantes: ", trek_torps_remaining, "^"; ]; [ KlingonsShoot i j k x1 y1 x2 y2 rng dmg; i = trek_long_range_galaxy-->trek_quadrant_position; i = i / 100; ! Klingons if (i == 0) return; if (trek_docked_flag > 0) "^Le bouclier Starbase protège l'Entreprise^^"; j = -1; for (k = 0: k < 64: k++) { if (trek_sector->k == KLINGON) { j++; x1 = (k % 8) + 1; y1 = 8 - (k / 8); x2 = (trek_sector_position % 8) + 1; y2 = 8 - (trek_sector_position / 8); rng = Range(x1, y1, x2, y2); dmg = trek_klingon_array->j; x2 = trek_klingon_array->j; x2 = x2 * 2 / 3; ! Reduce available Klingon energy by 1/3 trek_klingon_array->j = x2; dmg = dmg * 10 / (rng + random(5) - 1); print "^Le vaisseau de guerre Klingon ", x1, ", ", y1, " tire sur vous ", dmg, " unités de dommage.^"; if (dmg > trek_shield_value) { ShipDestroyed(); } else { trek_shield_value = trek_shield_value - dmg; print "^L'énergie du bouclier est descendu à ", trek_shield_value, " unitées.^"; if (dmg >= 20) { if (random(10) < 7 || (dmg * 10 / trek_shield_value > 2)) { dmg = random(8) - 1; if (trek_damage_array->dmg > 0) { x2 = trek_damage_array->dmg; x2--; trek_damage_array->dmg = x2; } print "^Rapport contrôle de Dommage: ~"; switch(dmg) { 0 : print "Préjudice moteur est"; 1 : print "Scanner Courte Portée est"; 2 : print "Scanner Longue Portée est"; 3 : print "Contrôle Phaser est"; 4 : print "Les tubes de torpille de photon sont"; 5 : print "Contrôle Dommage est"; 6 : print "Control Bouclier est"; 7 : print "Bibliothèque d'ordinateur est"; } print " endommagé dans l'attaque.~^"; } } } } } KlingonsMove(); UpdateStatus(); ShortRangeScan(); ]; [ KlingonsMove i j k; j = 0; for (i = 0: i < 64: i++) { if (trek_sector->i == KLINGON) { j++; ! Count the number of Klingons in the sector trek_sector->i = 0; ! and zero their location } } for (i = 1: i <= j: i++) ! Position Klingons { .Retry4; k = random(64) - 1; if (trek_sector->k ~= 0) jump Retry4; else trek_sector->k = KLINGON; } if (trek_klingon_array->0 == 0) ! "Garbage collect" the damage array trek_klingon_array->0 = trek_klingon_array->1; if (trek_klingon_array->1 == 0) trek_klingon_array->1 = trek_klingon_array->2; ]; [ DamageRepair i j k; if (trek_docked_flag == 1) ! Docked { trek_docked_flag = 2; trek_current_energy = MAX_POWER; trek_torps_remaining = trek_torp_capacity; if (trek_shield_value > 0) print "^Retrait du bouclier pour l'arrimage.^"; trek_shield_value = 0; j = 0; for (i = 0: i < 8: i++) { if (trek_damage_array->i < 5) j = j + (5 - trek_damage_array->i); } if (j > 0) { print "^Les techniciens sont en position pour effectuer la réparation sur votre vaisseau. Cette réparation prendra ", j / 10, ".", j % 10, " jours complets. Autorisez-vous cette réparation? (O/N) "; ! vérifier O/N @read_char->k; if (k == 'O' or 'o') { trek_current_date = trek_current_date + j; trek_end_of_time = trek_end_of_time - j; if (trek_end_of_time <= 0) EndOfTime(); for (i = 0: i < 8: i++) trek_damage_array->i = 5; print "^"; } else "^"; } } else { k = trek_damage_array->DAMAGE_CONTROL; for (i = 0: i < 8: i++) { if (trek_damage_array->i < 5 && random(20) < k) { j = trek_damage_array->i; j++; trek_damage_array->i = j; print "^Rapports Dommage contrôle: ~Le "; switch(i) { 0 : print "préjudice moteur a"; 1 : print "scanner courte portée a"; 2 : print "Scanner Longue Portée a"; 3 : print "système de contrôle Phaser a"; 4 : print "tube de torpille de photon a"; 5 : print "système de contrôle dommage a"; 6 : print "système de contrôle bouclier a"; 7 : print "système bibliothèque d'ordinateur a"; } if (j < 5) print " été partiellement réparé.~^"; else print " été complètement réparé.~^"; } } } ]; [ PrintQuadrantName x y; if (x == 1 or 2) { if (y == 1 or 2) print "Antares"; if (y == 3 or 4) print "Rigel"; if (y == 5 or 6) print "Procyon"; if (y == 7 or 8) print "Vega"; } if (x == 3 or 4) { if (y == 1 or 2) print "Canopus"; if (y == 3 or 4) print "Altair"; if (y == 5 or 6) print "Sagittarius"; if (y == 7 or 8) print "Pollux"; } if (x == 5 or 6) { if (y == 1 or 2) print "Sirius"; if (y == 3 or 4) print "Deneb"; if (y == 5 or 6) print "Capella"; if (y == 7 or 8) print "Betelgeuse"; } if (x == 7 or 8) { if (y == 1 or 2) print "Aldebaran"; if (y == 3 or 4) print "Regulus"; if (y == 5 or 6) print "Arcturus"; if (y == 7 or 8) print "Spica"; } if (x == 1 or 3 or 5 or 7) { if (y == 1 or 3 or 5 or 7) print " I"; else print " III"; } if (x == 2 or 4 or 6 or 8) { if (y == 1 or 3 or 5 or 7) print " II"; else print " IV"; } ]; [ Range x1 y1 x2 y2 delta_x delta_y result; delta_x = (x1 - x2) * 10; delta_x = delta_x * delta_x; delta_y = (y1 - y2) * 10; delta_y = delta_y * delta_y; result = SquareRoot(delta_x + delta_y); return result; ]; ! Brute force approach to finding the square root of a number [ SquareRoot a b; for (b = 1: b <= 110: b++) { if (b * b > a) return (b - 1); } ]; [ ShipDestroyed ; print "L'Entreprise a été détruite. Vous avez échoué. "; LoseGame(); ]; [ OutOfEnergy ; print "^Vous vous êtes perdu dans l'espace et n'avez pas assez d'énergie pour arriver à la base! "; LoseGame(); ]; [ EndOfTime ; print "Vous avez échoué dans votre mission car le temps est écoulé, Capitaine! "; LoseGame(); ]; [ LoseGame ; print "date de départ ", (trek_current_date / 10), ".", (trek_current_date % 10), ". "; print "Localisation "; if (trek_klingons_left == 1) print "était "; else print "étaient "; print trek_klingons_left, " vaisseau de guerre Klingon"; ! vérifier peut être pas besoin "s" ci-dessous if (trek_klingons_left ~= 1) print "s"; print " laissé à la fin de votre mission.^^"; print "[Appuyez sur une touche pour continuer.]^"; Pause(); EndScreen(); ]; [ WonGame ; print "Félicitations, Capitaine! Vous avez détruit le dernier vaisseau de guerre Klingon dans votre secteur de patrouille.^^"; print "[Appuyez sur une touche pour continuer.]^"; Pause(); EndScreen(); ]; [ EndScreen ; @set_cursor 1 1; @split_window 0; @erase_window $ffff; print "^Merci d'avoir joué à Super Z Trek.^^"; @quit; ]; [ Pause dummy; @read_char 1 dummy; return dummy; ]; [ Help i; print "^Choisissez quel fichier lire:^^"; print "1: Comment Jouer à Super Z Trek^"; print "2: A propos de ce jeu^"; print "3: Sortie^^"; print "Entrez votre choix: "; @read_char 1 -> i; print i - 48, "^"; switch(i) { '1' : HowToPlay(); '2' : About(); '3' : "^Sortie de la bibliothèque de l'ordinateur.^^"; default: "^Choix invalide.^"; } ]; [ HowToPlay ; print "^Bienvenue à Super Z Trek, Le jeu électronique classique importé sur Z machine.^^"; print "La galaxie Z Trek est divisé en Zone de 8 x 8, et chaque cadran est divisé plus loin en secteur de 8 x 8.^^"; print "Vous serez assignés à un point de départ à un endroit dans la galaxie pour commencez d'accomplir votre devoir comme Capitaine de l'Entreprise starship. Votre mission: rechercher et détruire une flotte de vaisseaux de guerre Klingon qui ont envahi les Planètes Unies de la Fédération.^^"; print "COMMANDES^^"; print "La barre de menu en haut de l'écran montre l'information sur le Jeu actuel et une liste de commandes. Chaque commande (numérotée de '0' à '9') est activé en appuyant sur la touche appropriée. Chaque touche doit être appuyée une seul fois; Vous ne devez pas appuyer sur 'Entrer' pour complèter la commande. Chaque commande est décrite ci-dessous.^^"; print "1. Nav: Cette commande est utilisée pour déplacer l'Enterprise dans la galaxie. deux information complémentaires sont exigées pour terminer cette commande: Trajectoire et vitesse. Le Trajet est chiffré de 1 à 9, comme suit:^^"; PrintCompass(); print "^Comme avec les touches de commande, seul ce numéro est requis pour le trajet, il n'est donc pas nécessaire de valider avec la touche 'entrer'.^^"; print "La deuxième entrée est la vitesse, Qui est aussi un numéro. La vitesse de l'Entreprise s'étend de 1 jusqu'à un maximum de 8, mais ce maximum peut réduire où endommager le préjudice moteur. La vitesse est entré de la même manière que le trajet, Juste avec la touche numérotés requis.^^"; print "Si vous voulez interrompre la commande de navigation, entrer une valeur invalide pour le trajet où la vitesse.^^"; print "2. SCP: Cette commande imprime les résultats du Scanner Courte Portée. Montre ce qui occupe la zone courante à l'emplacement de l'Entreprise. Les symboles utilisés sont:^^"; print " +E+ = La position de votre vaisseau^"; print " +K+ = Vaisseau de guerre Klingon^"; print " >B< = Base de la Federation (Fuel/Réparation/Réarmez ici)^"; print " >D< = Base de la Federation Où l'Entreprise s'est amarré^"; print " # = Etoile^"; print " . = Espace vide^^"; print "3. SLP: Cela montre les conditions d'expositions de l'espace pour une zone sur chaque côté de l'Entreprise (qui est au milieu du scanner en inverse vidéo). Le scanner est codé sous la forme ~###~ ou le chiffre d'unités est le nombre d'étoiles, le chiffre de dizaines est le nombre de bases, et la centaine du chiffre est le nombre de Klingons.^^"; print "Exemple: 207 = 2 Klingons, pas de bases, et 7 étoiles.^^"; print "4. Phaser: Vous permet de détruire le vaisseau de guerre Klingon en zappant avec de grandes unités d'énergie convenable pour épuiser leur puissance de bouclier. Avec cette commande, vous devez entrer le numéro d'unités d'énergie que vous voulez tirer, alors appuyez sur la touche 'Entrer'. La quantité d'énergie que vous emploierez seront également divisé entre tout les vaisseaux de guerre Klingons dans la zone.^^"; print "5. Torp: Cette commande tire une torpille de photon sur un vaisseau Klingon. Vous devrez entrer une trajectoire pour la torpille, qui est le même utilisé dans le déplacement. Si vous frappez le vaisseau Klingon, il est détruit et ne peut pas vous tirer dessus. Si vous le ratez, vous êtes soumis au tir de l'autre Klingons dans la zone.^^"; print "Note: Comme Inform fonctionne seulement avec des nombres, cette version élimine la conjecture impliquée dans le déplacement et le tir de torpilles. Pour compenser cela, l'algorithme de torpille donne à la torpille une chance aléatoire de réussir ou rater le tir, qui augmente quand la variation augmente.^^"; print "6. Cette commande définit le numéro d'unités d'énergie pour le bouclier. L'énergie pour les boucliers est prise sur l'énergie totale du vaisseau. Si l'Entreprise est touchée et que la valeur du bouclier est réduite à zéro ou moins, l'Entreprise est détruite. N'oubliez pas de mettre l'énergie dans le bouclier avant d'entrée en combat! Notez que l'énergie total maintenu ~ est noté en haut sur la barre de menu.^^"; print "7. Dégâts: Cette commande montre l'état de réparation de tous les dispositifs, ~Opérationnel~ où ~Endommagé.~ Si un dispositif est endommagé, l'équipage du vaisseau essayera de le réparer à chaque déplacements du vaisseau. Tout ce qui est endommagé peut être réparé quand vous vous amarrez à une base. Pour s'amarrer se déplacer simplement dans la même direction de la base dans le secteur.^^"; print "8. Biblio: La bibliothèque d'ordinateur a deux fonctions: ^^"; print "Fonction 1: Record Cumulatif Galactique. L'ordinateur montre la mémoire des résultats de tous les scanners court et long.^^"; print "Fonction 2: Rapport de Statut. Cette fonction montre le nombre de Klingons, les dates, et les bases restantent dans le jeu.^^"; print "9. Aide: Montre le menu d'aide.^^"; print "0. Quit: Quitte le jeu.^^"; ]; [ About ; print "^Le jeu Star Trek est depuis la nuit des temps sur nos ordinateurs. Cette version, écrite en language Inform par John Menichelli, est juste la dernière incarnation de ce jeu classique. Si vous avez des questions, commentaires où bug à reporter, envoyez moi un email à menichel@@0064pixi.com. Ce programe et ses code source sont du domaine public.^^"; print "La version Inform est basé sur le language C du vieux BASIC. La version C à été écrite par Chris Nystrom et est disponible sur:^^"; print "http://www.cfi.org/pub/ccn/startrek^^"; print "Vous pouvez contacter l'auteur de la version C:^^"; print "Chris Nystrom^ 1013 Prairie Dove Circle^ Austin, Texas 78758^^ E-Mail: chris@@0064gnu.ai.mit.edu, nystrom@@0064cactus.org, où ccn@@0064cfi.org^^"; print "Version Française en Inform traduit par Sabine Gorecki^ Site: http://fa1ckg.free.fr^ E-mail: fa1ckg@@0064tiscali.fr^^"; print "Le jeu original Super Star Trek est inspiré du livre ~BASIC Computer Games~ édité par David Ahl of Creative Computing fame. Il a été publié en 1978 par Workman Publishing, 1 West 39 Street, New York, New York, et le ISBN est: 0-89489-052-3.^^"; print "Voici le BASIC original:^^"; print "SUPER STARTREK - MAY 16, 1978 - REQUIERT 24K DE MEMOIRES^^"; print " **** STAR TREK ****^"; print "SIMULATION D'UNE MISSION DE L'ENTREPRISE STARSHIP,^"; print "STAR TREK COMME VU À LA TÉLÉVISION.^"; print "PROGRAMME ORIGINAL PAR MIKE MAYFIELD, VERSION MODIFIÉE^"; print "PUBLIÉ EN DÉCEMBRE ~101 BASIC GAMES~, PAR DAVE AHL.^"; print "DERNIERE MODIFICATIONS (PLUS DEBUGGING) PAR BOB^"; print "LEEDOM - AVRIL & DECEMBRE 1974,^"; print "AVEC UNE PETITE AIDE DE SES AMIS . . .^"; print "COMMENTAIRES, ÉPITHÈTES, ET SUGGESTIONS SOLLICITÉ --^"; print "ENVOYEZ À: R. C. LEEDOM^"; print " WESTINGHOUSE DEFENSE & ELECTRONICS SYSTEMS CNTR.^"; print " BOX 746, M.S. 338^"; print " BALTIMORE, MD 21203^^"; print "CONVERTI À MICROSOFT 8 K BASIC 3/16/78 PAR JOHN BORDERS^"; print "NUMÉRO DE VERSION STREK7 DU 1/12/75 TOUT DROIT RÉSERVÉ^"; ];