REM /******************************************* REM * Star Trek for KM-BASIC web ver 0.1 * REM * Constructed by Katsumi * REM * kmorimatsu@users.sourceforge.jp * REM * http://hp.vector.co.jp/authors/VA016157/ * REM ******************************************** REM Strings REM s$ Current sector map string (64 characters) REM ".": None REM "E": Enterprise REM "K": Klingon starship REM "B": Starbase REM "*": Star REM m$ BGM REM Dimensions: REM d() Damage value is between 0-100 (%) REM 0% correspond to no damage REM d(0): Warp REM d(1): Short Range Sensor REM d(2): Long Range Sensor REM d(3): Phaser control REM d(4): Photon tubes REM d(5): Damage control REM d(6): Shield control REM d(7): Mr. Spock REM q(0-63) Galaxy data; y*8+x; x,y: 0-7 REM =K*100+B*10+S, where K, B, and S are # of Klingon ships, Base, and Stars REM e() Enterprise data REM e(0), e(1): x and y positions in Galaxy REM e(2), e(3): x and y positions in current sector REM e(4): Energy REM e(5): # of photon tubes REM e(6): Shields REM e(7): 1 if docked to Starbase. 0 if not REM g() Global data REM g(0): Stardate in the beginning (*100) REM g(1): Due date for mission in stardate (*100) REM g(2): Current stardate (*100) REM g(3): Average of Klingon ship energy when appears (=200) REM g(4): Full energy of Enterprise when docked (=3000) REM g(5): # of photon tubes when docked (=10) REM g(6): Klingon remaining REM g(7): # of Klingon starhip in the beginning REM g(8): # of starbase in Galaxy REM k(0-8) Klingon starship data in current sector REM k(0),k(3),k(6): Energy REM k(1),k(4),k(7): X position in current sector REM k(2),k(5),k(8): Y position in current sector REM The other valiables are used temporarily and can be destroyed in sub routines. REM */ REM /****************************************** REM * Begin the game * REM * If # of Klingon warship is more than 9, * REM * there must be at least a starbase. * REM ******************************************/ print print "シナリオ バンゴウヲ ニュウリョクシテク ダサイ" print "ランダムニ キメタイバアイハ 0" print "Senario #(0-999)"; a=val(input$()) if a<1 or 999
50 then return if rnd()>199661 then return c=(rnd()/4096) if c<7 then a=c:gosub EQPMNT:color 2:print "ダメージ" if c=7 then a=3:gosub PEOPLE:color 2:print "Mr. スポックガ フショウシタ!" music "c6z6c12z12" gosub waitm color 7 d(c)=d(c)+(8*b/e(6))+(rnd()/8192)+1 return REM /***************************** REM * Damage report * REM * Parameters: * REM * d(0): Warp Engine * REM * d(1): Short Range Sensor * REM * d(2): Long Range Sensor * REM * d(3): Phaser control * REM * d(4): Photon tubes * REM * d(5): Damage control * REM * d(6): Shield control * REM * d(7): Mr. Spock * REM *****************************/ label DAM REM when Mr. Spock is injured, Dr. McCoy answers if d(7)<1 then a=2:t$="デス" else a=3:t$="ダヨ" gosub PEOPLE if 0