home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / games / war.zip / WAR.BAS
BASIC Source File  |  1985-02-02  |  3KB  |  91 lines

  1. 1 R$="corporal"
  2. 10 LINE INPUT "What is your name?";N$
  3. 11 PRINT:PRINT
  4. 20 PRINT "Hello "R$" "N$" and welcome to Beruit"
  5. 30 PRINT "You  are in Beruit as part"
  6. 40 PRINT "of the multi-national peace keeping force."
  7. 50 PRINT "  As a member of the United States Marines you"
  8. 60 PRINT "have been assigned to guard the International"
  9. 70 PRINT "airport. "
  10. 80 PRINT "  The Drus Moslem malicia men are firing upon"
  11. 90 PRINT "your postion!   Your howitzer has a range of 10000 FT."
  12. 91 PRINT "Your orders are to return fire and knock out there guns."
  13. 92 PRINT "If you can come with in 50 Ft. of there postion they"
  14. 93 PRINT "will be destroyed."
  15. 95 PRINT
  16. 100 PRINT
  17. 135 RANDOMIZE
  18. 140 X=RND
  19. 150 Y=X*10000
  20. 152 RANDOMIZE
  21. 154 S=RND
  22. 156 E=100*S
  23. 158 IF E>88 THEN GOTO 152
  24. 170 PRINT "You calculate an enemy postion to be "Y" feet away."
  25. 180 INPUT "At what angle do you wish the gun to be at";A
  26. 200 Q=90-A
  27. 210 IF Q<0 GOTO 520
  28. 220 Q=ABS(Q)
  29. 230 IF A<1 GOTO 620
  30. 240 H=((SIN(2*A/57.29577951000001#))*(10000))
  31. 250 IF H<50 GOTO 580
  32. 260 B=Y-H
  33. 270 C=ABS(B)
  34. 280 IF C<50 THEN GOTO 640
  35. 290 IF B>1 GOTO 320
  36. 300 PRINT "You were over by "C" feet."
  37. 310 GOTO 340
  38. 320 PRINT "You were short by "C" feet."
  39. 340 F=((SIN(2*E/57.29577951000001#))*(10000))
  40. 350 L=Y-F
  41. 360 T=ABS(L)
  42. 370 IF T<50 THEN GOTO 680
  43. 380 PRINT "The enemy shoots and messes you by "T" feet!"
  44. 390 IF T>50 THEN P=.1436
  45. 400 IF T>100 THEN P=.286
  46. 410 IF T>250 THEN P=.716
  47. 420 IF T>500 THEN P=1.4
  48. 430 IF T>800 THEN P=2.3
  49. 440 IF T>2000 THEN P=9
  50. 450 IF T>4000 THEN P=15
  51. 460 IF T>6000 THEN P=22
  52. 470 IF T>8000 THEN P=32
  53. 480 IF L<0 THEN D=-1
  54. 490 IF L>0 THEN D=1
  55. 500 E=E+(D*P)
  56. 510 RESTORE
  57. 520 GOTO 180
  58. 530 PRINT "You TRAITOR!!!, you are firing on your own side!"
  59. 540 PRINT "The angle of your gun should be less than 90!"
  60. 550 PRINT "  At your court marshal you plied stupidity and get set free."
  61. 551 PRINT "But you have been demoted to private!"
  62. 552 R$="private"
  63. 560 GOTO 10
  64. 570 PRINT
  65. 580 PRINT "Good move "R$" "N$" you have just shot yourself!"
  66. 590 PRINT "And you are dead!"
  67. 610 GOTO 700
  68. 620 PRINT "What are you trying to do "R$" "N$" or should I say"
  69. 621 R$="private first class"
  70. 622 PRINT R$" "N$"?  dig your own grave?"
  71. 630 GOTO 700
  72. 640 PRINT "Congratulations "R$" "N$"!  You have destroyed them enemy!"
  73. 641 R$="SERGEANT"
  74. 642 PRINT "You are now "R$" "N$"!!!"
  75. 650 PRINT "You were off target by "C" Feet!"
  76. 660 PRINT
  77. 670 GOTO 700
  78. 680 PRINT "The enemy shoots and destroys you!"
  79. 690 GOTO 750
  80. 700 PRINT "You have the choose of going home or returning to the front."
  81. 701 PRINT "Which will it be "R$" "N$"?  home or return";
  82. 702 INPUT F$
  83. 710 RESTORE
  84. 720 IF F$="RETURN" THEN GOTO 10
  85. 750 END
  86. 701 PRNT "Which will it be "R$" "N$"?  home or return";
  87. 702 INPUT F$
  88. 710 RESTORE
  89. 720 IF F$="RETURN" THEN GOTO 10
  90. 750 END
  91. 701 PR