currentDamage
AS typeOfDamage
'% -- 100 med is all crew dead or injured, 100 ship is all ship damaged totalDamage
AS typeOfDamage
' for stats at end of game currentSurvivors
AS INTEGER ' survivors on board, max is 20 totalSurvivorsSaved
AS INTEGER ' all survivors rescued and dropped off at a colony currentMedSupply
AS INTEGER ' number of med kits. they are used to heal crew injured totalMedSupply
AS INTEGER ' for end stats -- total - current is used
CONST selectionBeep
= "L20O3C" CONST errorBeep
= "L10O1CO0GEC" CONST movingShipBeep
= "L16O0F" CONST movingShipDelay
= 0.05 CONST hail
= "L20O3AAL30O3F" CONST hailDelay
= 1.5 'was 1 CONST returnBeep
= "L10O0GA" CONST beamingBeep
= "L60O2CACACACACACAL15O1CCL7O3C" CONST dockingBeep
= "L60O1FCFC" CONST dockingDelay
= 0.15 CONST runOverText
= "L32O1G" CONST printingBeep
= "L30O1F" CONST printingDelay
= 0.05 CONST correctBeep
= "L8O2DDL32O3C" CONST fireBeep
= "L64O3CEGAA" CONST shipHitBeep
= "L64O2EEEEEL16CCL64O1GABABN0N0BAGGAN0N0CEDE" CONST successBeep
= "L9O2DL15DL9DL4F" CONST medicalRepairBeep
= "L32O4CP4CP4CP4CP4CCC" CONST shipRepairBeep
= "L32O2GCGCGCGCGC" CONST t$
= "�" ' changing this will change all of the block graphics to the constant used
' share everything won't have worry about passing vairables
quizPassed = FALSE
tabToggle = 1
gameInProgress = 0
beenToMenu = 0
blackHole.code = 111
blackHole.clr = 8
wormHole.code = 145
wormHole.clr = 5
otherPlanet.code = 254
otherPlanet.clr = 13
wifranColony.code = 223
wifranColony.clr = 9
disabledShip.code = 15
disabledShip.clr = 12
Top.code = 244
Top.clr = 15
Bottom.code = 245
Bottom.clr = 15
informant.code = 213
informant.clr = 6
esplzr.code = 234
esplzr.clr = 11
sarienFleet.code = 176
sarienFleet.clr = 2
sarienShip.code = 224
sarienShip.clr = 2
whatHappened:
PRINT "ERROR. Hit any key to end and begin to code my way out of it."
Beginning:
PRINT LongCenter$
("I was introduced to computers by my father at a young age. He showed me a Texas Instruments device that was only a little bit old around 1982. I was still young enough to sit in his lap as we played " + CHR$(34) + "Hunt the Wumpus." + CHR$(34) + " He showed me a program his father had written called Colors. As it was the 80s, the program was saved on a casette tape. All it did was leave a character block trail on the screen of the current color. Not until I was older was I was able to understand some of the code.") PRINT LongCenter$
("When the Apple IIe was available as state of the art tech my father introduced me to computer code. I remember being facinated that CHR$(27) referred to the Escape key. One of the best things about the IIe was a new video game called King's Quest: The Quest for the Crown. The game was loaded by putting a 5.25 inch disk into the machine. Whoa! Major new tech. Lol. With the success of King's Quest, Sierra published a sequel and then a Space Quest.") PRINT LongCenter$
("As time went by Sierra published Quest sequels that took advantage of new tech. Through those series, I got to watch the evolution of mouse input, more than 16 colors, sound beyond the PC speaker and eventually VGA grahpics. In spite of the HD graphics and sound today, I still play those old games sometimes (gog.com has them). Because I was born in '77 I'm still in awe of not just the current machines but moreover the evolution of the computer tech as a whole.") a$ = "Thanks dad for such an incredicle view."
a$ = "Push any key to continue."
CALL Battle
(shipsInSarienFleet
)
fileName$(cnt) = "GGSave"
fileName$
(cnt
) = fileName$
(cnt
) + LTRIM$(STR$(cnt
)) fileName$(cnt) = fileName$(cnt) + ".txt"
' 1 2 3 4 5 6 7 8
' 12345678901234567890123456789012345678901234567890123456789012345678901234567890
PRINT " Slot Lives Score Moves Morale Damage Crew Injured" INPUT #1, shipStat$
'captainsLog.ships INPUT #1, scoreStat$
'captainsLog.score INPUT #1, moraleStat$
'captainsLog.morale INPUT #1, damStat$
'captainsLog.currentDamage.ship INPUT #1, injStat$
'captainsLog.currentDamage.medical
a$ = "Which save slot? "
LOOP UNTIL choice$
= "1" OR choice$
= "2" OR choice$
= "3" OR choice$
= "4" OR choice$
= "5" useFile$ = "GGSave" + choice$ + ".txt"
PRINT #1, STR$(shipLog.currentDamage.medical
)
'ship log done
' and now the grid
a$ = "You game has been saved."
fileName$
(cnt
) = "GGSave" + LTRIM$(STR$(cnt
)) + ".txt" PRINT " Slot Lives Score Moves Morale Damage Crew Injured"
a$ = "Which save slot? (ESC to cancel) "
'gameInProgress = FALSE
LOOP UNTIL choice$
= "1" OR choice$
= "2" OR choice$
= "3" OR choice$
= "4" OR choice$
= "5" useFile$ = "GGSave" + choice$ + ".txt"
LOCATE 20, GetCenter
("File not found.") gameInProgress = FALSE
Espializer7.x
= VAL(esplzrX$
) Espializer7.y
= VAL(espCoord$
) shipLog.moves
= VAL(slMv$
) shipLog.ships
= VAL(slShips$
) shipLog.score
= VAL(slScore$
) shipLog.morale
= VAL(slMorale$
) shipLog.currentDamage.ship
= VAL(slCDs$
) shipLog.currentDamage.medical
= VAL(slCDm$
) shipLog.totalDamage.ship
= VAL(slTDs$
) shipLog.totalDamage.medical
= VAL(slTDm$
) shipLog.currentSurvivors
= VAL(slCS$
) shipLog.totalSurvivorsSaved
= VAL(slTS$
) shipLog.currentMedSupply
= VAL(slCMS$
) shipLog.totalMedSupply
= VAL(slTM$
) shipLog.enemiesDestroyed
= VAL(slED$
)
'ship log done
shipsInSarienFleet
= VAL(sif$
) fleetJumpsWhenThisReaches0
= VAL(fj$
) gameInProgress
= VAL(gip$
) ' and now the grid
grid
(x
, y
, f
) = VAL(char$
) CLOSE #1 'hope i didn't forget anything
'Stats
gameInfo:
PRINT "Espializer 7 Coordinates (";
PRINT "Systems Damaged: ";
PRINT "Medical Supplies: ";
PRINT "Survivors Aboard: ";
COLOR wifranColony.clr
, 0 Num = fleetJumpsWhenThisReaches0
PRINT "Ships in Fleet: ";
mapKey:
COLOR wifranColony.clr
, 0 PRINT CHR$(wifranColony.code
);
" = Drop Off Survivors" PRINT CHR$(otherPlanet.code
);
" = Get Medical Kits" m$
= CHR$(sarienFleet.code
) PRINT m$; m$;
" = Sarien Fleet" PRINT CHR$(sarienShip.code
);
" = Sarien Cruiser" COLOR disabledShip.clr
, 0 PRINT CHR$(disabledShip.code
);
" = Disabled Ship" PRINT "LETTER = Wormhole"
commandList:
PRINT "Use the arrow keys to move the ";
PRINT " = use information " PRINT " = toggle display readout. ";
PRINT " = end without save"
endStatus:
'dimension the wrong answers
DIM incorrectStatements$
(1 TO 30) incorrectStatements$(1) = "The Sariens are using their free time for stopping TV broadcasts. "
incorrectStatements$(2) = "The Sariens are the good guys. "
incorrectStatements$(3) = "The Sariens use modifided math to create wormholes. "
incorrectStatements$(4) = "The Sariens can inflict telepathic damage and defeat you from afar. "
incorrectStatements$(5) = "It is possible for the Sariens to jump when you hit [J]. "
incorrectStatements$(6) = "Wifran colonies (blue) are where to start buliding your army of soldiers. "
incorrectStatements$(7) = "It is impossible to defeat the Sarien Fleet. Win the game by other means. "
incorrectStatements$(8) = "It is possible for the Sariens to rearrange time to move thier Fleet. "
incorrectStatements$(9) = "The Sarien fleet can suck you into the wake created by jumping. "
incorrectStatements$(10) = "There are cheat keys which will help you out if you chose to use them. "
incorrectStatements$(11) = "Push [SPACEBAR] to leave the battle with the Fleet. "
incorrectStatements$(12) = "You can use the arrow keys or WASD to move across the Galaxy Grid. "
incorrectStatements$(13) = "The Sariens have a total of 35 ships on the grid. "
incorrectStatements$(14) = "The Quasi-Molecular Jumping Device lets Sariens travel through time. "
incorrectStatements$(15) = "The Sariens can only use their Jumping Device when you're nearby. "
incorrectStatements$(16) = "The QMJD is a Questionable Morally Judged Decision. "
incorrectStatements$(17) = "The QMJD is a Quasi-Molecular Jewel-crafting Device. "
incorrectStatements$(18) = "The QMJD is a tool the Sariens are using to destroy the known universe. "
incorrectStatements$(19) = "The Quasi-Molecular Jumping Device does not really do anything. "
incorrectStatements$(20) = "The Sariens stole the graphics in this game from Space Quest I by Sierra. "
incorrectStatements$(21) = "Mork and Mindy is the Sariens' favorite TV program. "
incorrectStatements$(22) = "The QMJD used by the Sariens is an upgrade of the Star Generator. "
incorrectStatements$(23) = "This is the correct answer. "
incorrectStatements$(24) = "The Sarien fleet has infinite battleships. You can never defeat them. "
incorrectStatements$(25) = "2 + 2 = 4. That's true so this must be the correct answer. "
incorrectStatements$(26) = "Watch out for black holes. "
incorrectStatements$(27) = "The Sariens look like squids with fingers. "
incorrectStatements$(28) = "The QMJD changes time so that it goes sideways instead of forward or back. "
incorrectStatements$(29) = "This is not the correct choice. "
incorrectStatements$(30) = "No good deeds go unpunished so you might as well join the Sariens. "
' dimension correct statements
DIM correctStatements$
(1 TO 10) correctStatements$(1) = "Repaing your ship and healing you crew at the same time is less effective. "
correctStatements$(2) = "The QMJD is a Quasi-Molecular Jumping device. "
correctStatements$(3) = "The QMJD allows the Sarien fleet to jump over large parts of space. "
correctStatements$(4) = "Don't attempt to drop off survivors unless you have some aboard. "
correctStatements$(5) = "The Sariens stole the Star Generator from Space Quest I in the 80s. "
correctStatements$(6) = "The QMJD creates a temporary wormhole allowing the Sarien fleet to move. "
correctStatements$(7) = "By completing this quiz, a new statistic will appear in the status area. "
correctStatements$(8) = "Defeating the Sarien Fleet completes the game. Defeat lone ships for points."
correctStatements$(9) = "The more Sarien ships you destroy, the easier it is to destroy the next one."
correctStatements$(10) = "The Quasi-Molecular Jumping Device creates artificial wormholes. "
' start the quiz with instructions and 0 correct
quizPassed = FALSE
numberCorrectlyAnswered = 0
a$ = "In each set of four statements you must"
b$ = "select the one mentioned by the informants."
PRINT "mentioned by the informants";
' dimnension slots for the wrong and right answers and randomly fill them
a$ = "In each set of four statements you must"
b$ = "select the one mentioned by the informants."
PRINT "mentioned by the informants";
LOCATE 22, GetCenter
("question x of 10")
' put the correct answer in a random slot
fillThisSlot
= INT(RND * 4) + 1 differentCorrectAnswer:
rightAnswer
= INT(RND * 10) + 1 IF correctStatements$
(rightAnswer
) = "" THEN GOTO differentCorrectAnswer
answerSlots$(fillThisSlot) = correctStatements$(rightAnswer)
correctStatements$(rightAnswer) = ""
'put the wrong answer in the other slots
IF answerSlots$
(filling
) <> "" THEN differentWrongAnswer:
wrongAnswer
= INT(RND * 30) + 1 IF incorrectStatements$
(wrongAnswer
) = "" THEN GOTO differentWrongAnswer
answerSlots$(filling) = incorrectStatements$(wrongAnswer)
incorrectStatements$(wrongAnswer) = ""
' display statements
FOR lettersToPick
= 65 TO 68 PRINT answerSlots$
(lettersToPick
- 64) LOCATE , GetCenter
("Pick A, B, C or D: ") PRINT "Pick A, B, C or D: ";
IF chosenAnswer
= fillThisSlot
THEN numberCorrectlyAnswered = numberCorrectlyAnswered + 1
answerSlots$(clearThem) = ""
gotoHere:
IF numberCorrectlyAnswered
= 10 THEN quizPassed = TRUE
shipLog.morale = shipLog.morale + 200
shipLog.totalMorale = shipLog.totalMorale + 200
information$(1) = "When visiting a space station your medical supplies are more efficient if you concentrate on healing your crew."
information$(2) = "Use the lettered wormholes to get to the Sairen Fleet more quickly."
information$(3) = "Press the [TAB] key to view the map key and available commands."
information$(4) = "Don't try to drop off survivors rescued from disabled ship unless you have survivors aboard."
information$(5) = "The game is won when you defeat the Sarien fleet."
information$(6) = "The way to defeat the fleet of Sarien battleships is to retreat after defeating some of them. You can retreat by escaping."
information$(7) = "It is easier to defeat the next Sarien ship each time you defeat one."
information$(8) = "Pressing [SPACEBAR] will give you a quiz about the information us informants give you. Scoring 100% correct will let you know when the Sarien Feelt is planning to activate their Quasi-Molecular Jumping Device."
information$(9) = "The Quasi-Molecular Jumping Device (QMJD) changes atomic structures to create a temporary artificial wormhole to effect travel. This allows the Sarien Fleet to jump over large and small points on the grid."
information$(10) = "The Sariens are known throughout the galaxy as the ones who stole the Star Generator way back in Space Quest 1: The Sarien Encounter, a hit video game from the 1980s."
shipLog.score = shipLog.score + 25
shipLog.morale = shipLog.morale + 1
'Draw the
CALL HorizontalLine
(1, 80, lp
, t$
) CALL HorizontalLine
(1, 4, 10, t$
) CALL HorizontalLine
(1, 3, 11, t$
) CALL HorizontalLine
(1, 2, 12, t$
) CALL HorizontalLine
(20, 42, 10, t$
) CALL HorizontalLine
(21, 41, 11, t$
) CALL HorizontalLine
(22, 40, 12, t$
) CALL HorizontalLine
(23, 39, 13, t$
) CALL HorizontalLine
(24, 38, 14, t$
) CALL HorizontalLine
(25, 37, 15, t$
) CALL HorizontalLine
(58, 80, 10, t$
) CALL HorizontalLine
(59, 80, 11, t$
) CALL HorizontalLine
(60, 80, 12, t$
) CALL HorizontalLine
(61, 80, 13, t$
) CALL HorizontalLine
(62, 80, 14, t$
) CALL HorizontalLine
(63, 80, 15, t$
) CALL HorizontalLine
(10, 11, 10, t$
) CALL HorizontalLine
(13, 14, 10, t$
) CALL HorizontalLine
(48, 49, 10, t$
) CALL HorizontalLine
(51, 52, 10, t$
) CALL DrawEspializer7
("W", 75, 41, 0) ClearStatus
a$ = "You arrive at a Space Station of special interest to those who trade in information. The Wifran war with the Sariens hampers their abilities to sell information. With your promise to destory the evil Sariens, the information trader at this has agreed to give you some precious intel."
a$ = "push [SPACEBAR] to dock with the ."
PRINT " to dock with the ." CALL WaitForCharacter
(" ") 'Move the Espializer7
CALL DrawEspializer7
("W", x
, 41, 0) CALL DrawEspializer7
("W", x
, 41, 1) CALL DrawEspializer7
("N", 50, y
, 0) CALL DrawEspializer7
("N", 50, y
, 1) 'open the docking bay
CALL HorizontalLine
(48, 49, 11, t$
) CALL HorizontalLine
(51, 52, 11, t$
) CALL HorizontalLine
(48, 49, 12, t$
) CALL HorizontalLine
(51, 52, 12, t$
) CALL HorizontalLine
(47, 48, 16, t$
) CALL HorizontalLine
(52, 53, 16, t$
)
'dock
CALL DrawEspializer7
("N", 50, y
, 0) CALL DrawEspializer7
("N", 50, y
, 1)
theString$ = LongCenter$(information$(grid(Espializer7.x, Espializer7.y, 3)))
theLetter$
= MID$(theString$
, x
, 1) LOCATE 48, GetCenter
("Push 'r' to return to the grid.") PRINT "eturn to the Galaxy Grid." CALL WaitForCharacter
("r") 'erase the informant from the Grid
grid(Espializer7.x, Espializer7.y, 3) = 0
cutHere = 46
cutHere = cutHere - 1
cutting$
= MID$(text$
, cutHere
, 1) partString$
= MID$(text$
, 1, cutHere
) text$
= MID$(text$
, cutHere
+ 1, LEN(text$
)) spaces$
= STRING$(GetCenter
(partString$
), " ") cutString$ = spaces$ + partString$ + spaces$
returnThis$ = returnThis$ + cutString$
numLastSpaces = GetCenter(text$)
lastSpaces$
= STRING$(numLastSpaces
, " ") returnThis$ = returnThis$ + lastSpaces$ + text$ + lastSpaces$
LongCenter$ = returnThis$
' maybe do a repair sound and a delay
'Draw the
CALL HorizontalLine
(1, 80, lp
, t$
) CALL HorizontalLine
(1, 4, 10, t$
) CALL HorizontalLine
(1, 3, 11, t$
) CALL HorizontalLine
(1, 2, 12, t$
) CALL HorizontalLine
(20, 42, 10, t$
) CALL HorizontalLine
(21, 41, 11, t$
) CALL HorizontalLine
(22, 40, 12, t$
) CALL HorizontalLine
(23, 39, 13, t$
) CALL HorizontalLine
(24, 38, 14, t$
) CALL HorizontalLine
(25, 37, 15, t$
) CALL HorizontalLine
(58, 80, 10, t$
) CALL HorizontalLine
(59, 80, 11, t$
) CALL HorizontalLine
(60, 80, 12, t$
) CALL HorizontalLine
(61, 80, 13, t$
) CALL HorizontalLine
(62, 80, 14, t$
) CALL HorizontalLine
(63, 80, 15, t$
) CALL HorizontalLine
(10, 11, 10, t$
) CALL HorizontalLine
(13, 14, 10, t$
) CALL HorizontalLine
(48, 49, 10, t$
) CALL HorizontalLine
(51, 52, 10, t$
)
CALL DrawEspializer7
("W", 75, 41, 0) ClearStatus
a$ = "push [SPACEBAR] to dock with the ."
PRINT " to dock with the ." CALL WaitForCharacter
(" ") 'Move the Espializer7
CALL DrawEspializer7
("W", x
, 41, 0) CALL DrawEspializer7
("W", x
, 41, 1) CALL DrawEspializer7
("N", 12, y
, 0) CALL DrawEspializer7
("N", 12, y
, 1) 'open the docking bay
CALL HorizontalLine
(10, 11, 11, t$
) CALL HorizontalLine
(13, 14, 11, t$
) CALL HorizontalLine
(10, 11, 12, t$
) CALL HorizontalLine
(13, 14, 12, t$
) CALL HorizontalLine
(9, 10, 16, t$
) CALL HorizontalLine
(14, 15, 16, t$
)
'dock
CALL DrawEspializer7
("N", 12, y
, 0) CALL DrawEspializer7
("N", 12, y
, 1)
c = shipLog.currentDamage.ship ' if damage is 100, 100% of the ship is damaged and therefore destroyed. same for med
td = shipLog.totalDamage.ship
m = shipLog.currentDamage.medical
mt = shipLog.totalDamage.medical
s = shipLog.currentMedSupply
ml = shipLog.morale
ClearStatus
COLOR 13, 7 'Purple on the bg PRINT ". Repair the ship" PRINT "1. Repair the ship" PRINT ". Heal and repair" PRINT "3. Heal and repair" PRINT " is available for use. " PRINT " are available for use. " PRINT " are available for use. " PRINT "completely repair the ship."
'gray them out after choosing
PRINT "1. Repair the ship" PRINT "3. Heal and repair"
td = td + c
c = c - 1
ml = ml - 5
shipLog.score = shipLog.score + 1
mt = mt + m
m = m - heal
m = 0
s = s - 1
shipLog.score = shipLog.score + 1
mt = mt + m
m = m - heal
m = 0
s = s - 1
td = td + c
c = c - 1
ml = ml - 5
shipLog.score = shipLog.score + 1
PRINT " is available for use. " PRINT " are available for use. " PRINT " are available for use. " PRINT " to use. " 'morale is subtracted by 5s but I may have need of this later as the coding continues -- someone once said "it's all in the details" -- every time I see a plural after a 1 I feel irritated PRINT " to use. " ' dunno if this is necessary at all PRINT "completely repair the ship."
LOCATE 43, GetCenter
("Push r to return to the Galaxy Grid.") PRINT "eturn to the Galaxy Grid." CALL WaitForCharacter
("r") shipLog.currentDamage.ship = c
shipLog.totalDamage.ship = td
shipLog.currentDamage.medical = m
shipLog.totalDamage.medical = mt
shipLog.currentMedSupply = s
shipLog.morale = ml
PRINT "The Espializer 7 approaches" PRINT "a disabled Wifran ship. ";
' draw the disabled ship
CALL HorizontalLine
(4, 6, 13, CHR$(219)) CALL HorizontalLine
(3, 7, 14, CHR$(219)) CALL HorizontalLine
(4, 6, 15, CHR$(219))
CALL DrawEspializer7
("W", 76, 37, 0) CALL WaitForCharacter
(" ") ClearStatus
'move the Espializer7 to the left
CALL DrawEspializer7
("W", x
, 37, 0) CALL DrawEspializer7
("W", x
, 37, 1) ' move the Espializer 7 up
CALL DrawEspializer7
("N", 46, y
, 0) CALL DrawEspializer7
("N", 46, y
, 1) 'move the espializer left again and run over the text
CALL DrawEspializer7
("W", x
, 15, 0) CALL DrawEspializer7
("W", x
, 15, 1) skipBlack:
showNumOnBoard:
IF shipLog.currentSurvivors
= 1 THEN
skipOver:
survivorsAboardDisabledShip = grid(Espializer7.x, Espializer7.y, 3)
a$ = "push esc[] to hail the disabled shipk"
PRINT " to hail the disabled ship." a$ = "You tell the captain of the disabled"
a$ = "ship you heard the distress call"
b$ = "and have come to help if you can."
a$ = "The captain asks if you can accommodate"
b$ = "# surivior"
PRINT " aboard the Espializer 7." IF shipLog.currentSurvivors
= 20 THEN ELSEIF shipLog.currentSurvivors
+ survivorsAboardDisabledShip
> 20 THEN ableToAccomodate = 20 - shipLog.currentSurvivors
grid(Espializer7.x, Espializer7.y, 3) = grid(Espializer7.x, Espializer7.y, 3) - ableToAccomodate
a$ = "You tell the captain that your oxygen and similar resources are limited."
a$ = "You explain you can only accomodate # survivors"
b$ = "and will return for the the rest."
PRINT "You explain you can only accomodate ";
ableToAccomodate = grid(Espializer7.x, Espializer7.y, 3)
grid(Espializer7.x, Espializer7.y, 3) = 0
b$
= " - Type " + CHR$(34) + "BEAM" + CHR$(34) + " to beam # survivors to the Espializer 7." bc = GetCenter(b$)
PRINT " to the Espializer 7." PRINT "ot rescue the survivors." FOR cnt
= 1 TO ableToAccomodate
shipLog.score = shipLog.score + 20
CALL WaitForCharacter
("E") CALL WaitForCharacter
("A") CALL WaitForCharacter
("M") shipLog.currentSurvivors = shipLog.currentSurvivors + ableToAccomodate
shipLog.morale = shipLog.morale + (ableToAccomodate * 15)
shipLog.totalMorale = shipLog.totalMorale + shipLog.morale
shipLog.score = shipLog.score + (ableToAccomodate * 20)
ClearStatus
a$ = "Push r to return to the grid."
PRINT "eturn to the grid." CALL WaitForCharacter
("r") shipLog.score = shipLog.score - 20
shipLog.morale = shipLog.morale - 150
a$ = "Nobody saw that "
a$ = "your score and morale both decreased"
noRoomOnBoard:
a$ = "You tell the captain that your oxygen and similar resources are limited."
a$ = "You tell the captain you have no room on board."
a$ = "You apologize profusely and say you'll be back as soon as you can."
a$ = "Push r to return to the grid."
PRINT "eturn to the grid." CALL WaitForCharacter
("r") endAidSub:
SUB DrawSarienShip
(orientation$
, x
, y
, erased
)
SUB Battle
(singleOrFleet
) sarienDamaged = 0
printBattleStats:
IF sarienDamaged
>= 100 OR shipLog.currentDamage.ship
>= 100 OR shipLog.currentDamage.medical
>= 100 THEN GOTO endBattleSub
PRINT "Structural damage: ";
PRINT " Crew incapicated: ";
PRINT "Injuries and damage: ";
PRINT "Ships in Fleet: ";
continueBattle:
'randomize starting positions
wifranBattleX
= INT(RND * (75 - 5)) + 5 wifranBattleY
= INT(RND * (41 - 5)) + 5 IF whichSpin
= 1 THEN which$
= "N" IF whichSpin
= 2 THEN which$
= "S" IF whichSpin
= 3 THEN which$
= "W" IF whichSpin
= 4 THEN which$
= "E" CALL DrawEspializer7
(which$
, wifranBattleX
, wifranBattleY
, 0) wifranIsPointed$ = which$
'now to randomly place the Sariens without being too close to the espializer 7
getCoordinates:
enemyShipX
= INT(RND * (77 - 2)) + 2 enemyShipY
= INT(RND * (44 - 2)) + 2 ' create a function that returns true if the espializer7 and the sarien aren't too close and false if they are too close... x,y x,y
IF LocationGood
(wifranBattleX
, wifranBattleY
, enemyShipX
, enemyShipY
) = FALSE
THEN GOTO getCoordinates
IF whichSpin
= 1 THEN sarienOrientation$
= "N" IF whichSpin
= 2 THEN sarienOrientation$
= "S" IF whichSpin
= 3 THEN sarienOrientation$
= "W" IF whichSpin
= 4 THEN sarienOrientation$
= "E" CALL DrawSarienShip
(sarienOrientation$
, enemyShipX
, enemyShipY
, 0) 'now to move them and fire at eachother
pauseBattle = FALSE
previousDirection$ = wifranIsPointed$
previousEspializer7x = wifranBattleX
previousEspializer7y = wifranBattleY
IF sarienDamaged
>= 100 OR shipLog.currentDamage.ship
>= 100 OR shipLog.currentDamage.medical
>= 100 THEN GOTO endBattleSub
pauseBattle = TRUE
IF wifranBattleY
> 5 AND LocationGood
(wifranBattleX
, wifranBattleY
- 1, enemyShipX
, enemyShipY
) = TRUE
THEN wifranBattleY = wifranBattleY - 1
wifranIsPointed$ = "N"
pauseBattle = TRUE
IF wifranBattleX
> 5 AND LocationGood
(wifranBattleX
- 1, wifranBattleY
, enemyShipX
, enemyShipY
) = TRUE
THEN wifranBattleX = wifranBattleX - 1
wifranIsPointed$ = "W"
pauseBattle = TRUE
IF wifranBattleY
< 41 AND LocationGood
(wifranBattleX
, wifranBattleY
+ 1, enemyShipX
, enemyShipY
) = TRUE
THEN wifranBattleY = wifranBattleY + 1
wifranIsPointed$ = "S"
pauseBattle = TRUE
IF wifranBattleX
< 76 AND LocationGood
(wifranBattleX
, wifranBattleY
- 1, enemyShipX
, enemyShipY
) = TRUE
THEN wifranBattleX = wifranBattleX + 1
wifranIsPointed$ = "E"
CALL DrawEspializer7
(previousDirection$
, previousEspializer7x
, previousEspializer7y
, 1) CALL DrawEspializer7
(wifranIsPointed$
, wifranBattleX
, wifranBattleY
, 0) CALL DrawSarienShip
(sarienOrientation$
, enemyShipX
, enemyShipY
, 0) pauseBattle = FALSE
fireOnEnemy:
IF wifranBattleY
> 5 THEN 'fire a bullet up FOR bulletPosition
= wifranBattleY
- 5 TO 1 STEP -1 CALL Plot
(wifranBattleX
, bulletPosition
, t$
) CALL Plot
(wifranBattleX
, bulletPosition
, t$
) CALL DrawSarienShip
(sarienOrientation$
, enemyShipX
, enemyShipY
, 0) IF IsEnemyHit
(wifranBattleX
, bulletPosition
, enemyShipX
, enemyShipY
, sarienOrientation$
) = TRUE
THEN shipLog.score = shipLog.score + 1
sarienDamaged
= sarienDamaged
+ INT(RND * (50 + shipLog.enemiesDestroyed
+ 1)) + 1 bulletPosition = 0
CALL DrawSarienShip
(sarienOrientation$
, enemyShipX
, enemyShipY
, 0) CALL DrawSarienShip
(sarienOrientation$
, enemyShipX
, enemyShipY
, 0) CALL DrawSarienShip
(sarienOrientation$
, enemyShipX
, enemyShipY
, 1) FOR bulletPosition
= wifranBattleY
+ 5 TO 45 CALL Plot
(wifranBattleX
, bulletPosition
, t$
) CALL Plot
(wifranBattleX
, bulletPosition
, t$
) CALL DrawSarienShip
(sarienOrientation$
, enemyShipX
, enemyShipY
, 0) IF IsEnemyHit
(wifranBattleX
, bulletPosition
, enemyShipX
, enemyShipY
, sarienOrientation$
) = TRUE
THEN shipLog.score = shipLog.score + 1
sarienDamaged
= sarienDamaged
+ INT(RND * (50 + shipLog.enemiesDestroyed
+ 1)) + 1 bulletPosition = 46
CALL DrawSarienShip
(sarienOrientation$
, enemyShipX
, enemyShipY
, 0) CALL DrawSarienShip
(sarienOrientation$
, enemyShipX
, enemyShipY
, 0) CALL DrawSarienShip
(sarienOrientation$
, enemyShipX
, enemyShipY
, 1) FOR bulletPosition
= wifranBattleX
- 5 TO 1 STEP -1 CALL Plot
(bulletPosition
, wifranBattleY
, t$
) CALL Plot
(bulletPosition
, wifranBattleY
, t$
) IF IsEnemyHit
(bulletPosition
, wifranBattleY
, enemyShipX
, enemyShipY
, sarienOrientation$
) = TRUE
THEN shipLog.score = shipLog.score + 1
sarienDamaged
= sarienDamaged
+ INT(RND * (50 + shipLog.enemiesDestroyed
+ 1)) + 1 bulletPosition = 0
CALL DrawSarienShip
(sarienOrientation$
, enemyShipX
, enemyShipY
, 0) CALL DrawSarienShip
(sarienOrientation$
, enemyShipX
, enemyShipY
, 0) CALL DrawSarienShip
(sarienOrientation$
, enemyShipX
, enemyShipY
, 1) FOR bulletPosition
= wifranBattleX
+ 5 TO 79 ' sometimes a print at 80 will cause CR CALL Plot
(bulletPosition
, wifranBattleY
, t$
) CALL Plot
(bulletPosition
, wifranBattleY
, t$
) IF IsEnemyHit
(bulletPosition
, wifranBattleY
, enemyShipX
, enemyShipY
, sarienOrientation$
) = TRUE
THEN shipLog.score = shipLog.score + 1
sarienDamaged
= sarienDamaged
+ INT(RND * (50 + shipLog.enemiesDestroyed
+ 1)) + 1 bulletPosition = 80
CALL DrawSarienShip
(sarienOrientation$
, enemyShipX
, enemyShipY
, 0) CALL DrawSarienShip
(sarienOrientation$
, enemyShipX
, enemyShipY
, 0) 'why is this not working? CALL DrawSarienShip
(sarienOrientation$
, enemyShipX
, enemyShipY
, 1) CALL DrawSarienShip
(sarienOrientation$
, enemyShipX
, enemyShipY
, 0)
'now to move the sarien ship -- LocationGood helps
moveSarienShip:
randomX
= INT(RND * (76 - 3 + 1)) + 3 randomY
= INT(RND * (43 - 3 + 1)) + 3 rndOrt
= INT(RND * (4 - 1 + 1)) + 1 randomOrientation$ = "N"
randomOrientation$ = "S"
randomOrientation$ = "W"
randomOrientation$ = "E"
IF LocationGood
(wifranBattleX
, wifranBattleY
, randomX
, randomY
) = FALSE
THEN GOTO moveSarienShip
IF SarienWillHit
(wifranBattleX
, wifranBattleY
, randomX
, randomY
, randomOrientation$
) = FALSE
THEN GOTO moveSarienShip
CALL DrawSarienShip
(sarienOrientation$
, enemyShipX
, enemyShipY
, 1) enemyShipX = randomX
enemyShipY = randomY
sarienOrientation$ = randomOrientation$
CALL DrawSarienShip
(sarienOrientation$
, enemyShipX
, enemyShipY
, 0)
'and finally, for the sarien to fire on the espializer 7
sarienfiring:
IF sarienDamaged
>= 100 OR shipLog.currentDamage.medical
>= 100 OR shipLog.currentDamage.ship
>= 100 THEN RETURN 'always hits
damageAmount
= INT(RND * 40 - (shipLog.enemiesDestroyed
/ 1.5)) + 1 shipLog.currentDamage.ship = shipLog.currentDamage.ship + damageAmount
shipLog.totalDamage.ship = shipLog.totalDamage.ship + damageAmount
shipLog.currentDamage.medical = shipLog.currentDamage.medical + damageAmount
shipLog.totalDamage.medical = shipLog.totalDamage.medical + damageAmount
FOR bulletPosition
= enemyShipY
- 2 TO 1 STEP -1 CALL Plot
(enemyShipX
, bulletPosition
, t$
) CALL Plot
(enemyShipX
, bulletPosition
, t$
) IF wifranBattleY
= bulletPosition
THEN CALL DrawEspializer7
(wifranIsPointed$
, wifranBattleX
, wifranBattleY
, 0) bulletPosition = 0
FOR bulletPosition
= enemyShipY
+ 2 TO 45 CALL Plot
(enemyShipX
, bulletPosition
, t$
) CALL Plot
(enemyShipX
, bulletPosition
, t$
) IF wifranBattleY
= bulletPosition
THEN CALL DrawEspializer7
(wifranIsPointed$
, wifranBattleX
, wifranBattleY
, 0) bulletPosition = 46
FOR bulletPosition
= enemyShipX
+ 2 TO 80 CALL Plot
(bulletPosition
, enemyShipY
, t$
) CALL Plot
(bulletPosition
, enemyShipY
, t$
) IF wifranBattleX
= bulletPosition
THEN CALL DrawEspializer7
(wifranIsPointed$
, wifranBattleX
, wifranBattleY
, 0) bulletPosition = 81
FOR bulletPosition
= enemyShipX
- 2 TO 1 STEP -1 CALL Plot
(bulletPosition
, enemyShipY
, t$
) CALL Plot
(bulletPosition
, enemyShipY
, t$
) IF wifranBattleX
= bulletPosition
THEN CALL DrawEspializer7
(wifranIsPointed$
, wifranBattleX
, wifranBattleY
, 0) bulletPosition = 0
endBattleSub:
shipLog.score = shipLog.score + 100
shipLog.morale = shipLog.morale + 5
shipLog.enemiesDestroyed = shipLog.enemiesDestroyed + 1
grid(Espializer7.x, Espializer7.y, 3) = 0
ELSEIF singleOrFleet
= 1 THEN ' decrement this so game over a$ = "You have destroyed the Sarien ship. Push any key to continue."
shipsInSarienFleet = shipsInSarienFleet - 1
CALL Battle
(shipsInSarienFleet
) exitBattle:
'used for debugging
deadAsAdoornail:
a$ = "You failed. Your ship exploded without you aborad so you got a second command. And then a third. And still you didn't go down with your ship. You were demoted to assistant janitor of Roger Wilco. Learn something from him. Anyway, here's what your game looked like."
lineItUp = GetCenter("total sustained injured damage: ##,###%")
PRINT "Moves you made: ";
PRINT "Espializer 7s destroyed: ";
PRINT "Total sustained damage: ";
PRINT "Total amount of injured crew: ";
PRINT USING "##,###%"; shipLog.totalDamage.medical
PRINT "People rescued from disbaled ships: ";
PRINT "Medical kits used: ";
PRINT "Enemy ships destroyed: ";
PRINT "Total morale accumulated: ";
LOCATE 45, GetCenter
("Hit any key") addHighScore = TRUE
CALL HighScores
(addHighScore
)
won:
a$ = "Congratualtions!! You have defeated the Sarien fleet."
a$ = "Here's what your game looked like."
lineItUp = GetCenter("total sustained injured damage: ##,###%")
PRINT "Moves you made: ";
PRINT "Espializer 7s destroyed: ";
PRINT "Total sustained damage: ";
PRINT "Total amount of injured crew: ";
PRINT USING "##,###%"; shipLog.totalDamage.medical
PRINT "People rescued from disbaled ships: ";
PRINT "Medical kits used: ";
PRINT "Enemy ships destroyed: ";
PRINT "Total morale accumulated: ";
LOCATE 45, GetCenter
("Hit any key") addHighScore = TRUE
CALL HighScores
(addHighScore
)
endEndOfGameSUB:
SUB HighScores
(addOneToTheList
) PRINT #1, " NAME SCORE Moves " PRINT #1, " ------ ------- -------" PRINT #1, "1. Jimmy McAskill 10,240 1,240 " PRINT #1, "2. Tom Hazel 5,120 512 " PRINT #1, "3. Tony Vizcarrondo 2,560 256 " PRINT #1, "4. Andrea Thompson 1,280 128 " PRINT #1, "5. Frank Smith 640 64 " PRINT #1, "6. Lynette Blood 320 32 " PRINT #1, "7. Michelle Landry 160 16 " PRINT #1, "8. Justin Dilisio 80 8 " PRINT #1, "9. Ryan Sherriff 40 4 " PRINT #1, "10. No One Special -1 2 " DIM listOfScores$
(1 TO 10) IF addOneToTheList
= TRUE
THEN
addAscore:
leftInt
= VAL(MID$(listOfScores$
(count
), 51, 2)) rightInt
= VAL(MID$(listOfScores$
(count
), 54, 3)) scores(count) = (leftInt * 1000) + rightInt
leftInt
= VAL(MID$(listOfScores$
(count
), 68, 2)) rightInt
= VAL(MID$(listOfScores$
(count
), 71, 3)) move(count) = (leftInt * 1000) + rightInt
madeTheList = FALSE
IF shipLog.score
>= scores
(10) THEN
madeList:
madeTheList = TRUE
rank = 1
IF shipLog.score
< scores
(rank
) THEN rank
= rank
+ 1 scores(moveThemDown + 1) = scores(moveThemDown)
name$
(moveThemDown
+ 1) = name$
(moveThemDown
) move(moveThemDown + 1) = move(moveThemDown)
scores(rank) = shipLog.score
a$ = "CONGRATULATIONS!!"
a$ = "You made the top ten list of scores!"
INPUT "What is your name"; nm$
move(rank) = shipLog.moves
DIM lineToOutput$
(1 TO 10) lineToOutput$
(makeThem
) = LTRIM$(STR$(makeThem
)) + "." IF makeThem
< 10 THEN lineToOutput$
(makeThem
) = lineToOutput$
(makeThem
) + " " lineToOutput$
(makeThem
) = lineToOutput$
(makeThem
) + STRING$(6, " ") lineToOutput$(makeThem) = lineToOutput$(makeThem) + nm$
IF scores
(makeThem
) > 999 THEN leftInt
= INT(scores
(makeThem
) / 1000) IF leftInt
< 10 THEN nm$
= " " + nm$
lineToOutput$(makeThem) = lineToOutput$(makeThem) + nm$
rightInt = scores(makeThem) - (leftInt * 1000)
nm$ = "0" + nm$
nm$ = "00" + nm$
nm$ = nm$
nm$ = "000"
lineToOutput$(makeThem) = lineToOutput$(makeThem) + nm$
leftInt = 0
lineToOutput$(makeThem) = lineToOutput$(makeThem) + " "
IF scores
(makeThem
) < 100 AND scores
(makeThem
) >= 10 THEN nm$ = " " + nm$
nm$ = nm$
lineToOutput$(makeThem) = lineToOutput$(makeThem) + nm$
lineToOutput$
(makeThem
) = lineToOutput$
(makeThem
) + STRING$(10, " ") leftInt
= INT(move
(makeThem
) / 1000) IF leftInt
< 10 THEN nm$
= " " + nm$
lineToOutput$(makeThem) = lineToOutput$(makeThem) + nm$
rightInt = move(makeThem) - (leftInt * 1000)
nm$ = "0" + nm$
nm$ = "00" + nm$
nm$ = nm$
nm$ = "000"
lineToOutput$(makeThem) = lineToOutput$(makeThem) + nm$
leftInt = 0
lineToOutput$(makeThem) = lineToOutput$(makeThem) + " "
IF move
(makeThem
) < 100 AND move
(makeThem
) >= 10 THEN nm$ = " " + nm$
nm$ = " " + nm$
lineToOutput$(makeThem) = lineToOutput$(makeThem) + nm$
PRINT #1, " Rank NAME SCORE Moves " PRINT #1, "------ ------ ------- -------" PRINT #1, lineToOutput$
(cnt
)
viewScores:
LOCATE 15, GetCenter
(hyphens$
) LOCATE 15 + cnt
, GetCenter
(listOfScores$
(cnt
)) PRINT "Push any key to continue or Escape to end."
a$ = "Use the arrow keys to move. You command the"
c$ = "Espializer 7, the Flagship of the Wifrans."
b$ = "On the Galaxy Grid you are represented by G."
PRINT "On the Galaxy Grid you are represented by ";
a$ = "You begin at the top left of the screen. The top left (x, y)"
b$ = "coordinates are 1, 1. The bottom right is 80, 45"
a$ = "Visiting the informants (o) is recommended."
PRINT "Visiting the informants (";
PRINT ") is recommended." a$ = "There is an optional 10 question multiple choice quiz on the"
b$ = "information they give. Push [SPACEBAR] to take the quiz."
PRINT LongCenter
("Your goal is to locate and destroy the Sarien Fleet. In order to win, you must defeat all of the ships in the fleet. There are also lone Sarien ships you may engage for a higher score. You can visit Space Stations to repair damage to your ship and heal your injured crewmates.")
LOCATE , GetCenter
("Push any key to continue or [ESC] to end.") PRINT "Push any key to continue or [ESC] to end."
PLAY "MBL60O1CDEFGABO2CDEFGAB" titleString$ = "The Galaxy Grid"
wrongNumber:
PRINT " 3. Start a New Game" PRINT " 4. Save Current Game" PRINT " 5. Load Saved Game" PRINT " 6. Return to Game" PRINT " 7. View High Scores" implementCommand:
beenToMenu = 1
CASE "4" ' Save Current Game CASE "6" ' Return to Current Game
x = 1
y = 1
l$ = t$
x = 23
y = 1
l$ = t$
x = 34
y = 5
l$ = t$
l$ = t$
x = 56
y = 5
x = 67
y = 1
makeAnS:
CALL VerticalLine
(y
+ 5, y
+ 10, x
, l$
) CALL VerticalLine
(y
+ 34, y
+ 36, x
, l$
) CALL VerticalLine
(y
+ 4, y
+ 7, x
+ 1, l$
) CALL VerticalLine
(y
+ 4, y
+ 7, x
+ 2, l$
) CALL VerticalLine
(y
+ 9, y
+ 13, x
+ 1, l$
) CALL VerticalLine
(y
+ 10, y
+ 13, x
+ 2, l$
) CALL VerticalLine
(y
+ 34, y
+ 38, x
+ 1, l$
) CALL VerticalLine
(y
+ 36, y
+ 38, x
+ 2, l$
) CALL Plot
(x
+ 1, y
+ 37, l$
) CALL Plot
(x
+ 2, y
+ 3, l$
) CALL Plot
(x
+ 3, y
+ 3, l$
) CALL Plot
(x
+ 2, y
+ 2, l$
) CALL VerticalLine
(y
+ 14, y
+ 16, x
+ 2, l$
) CALL HorizontalLine
(x
+ 2, x
+ 5, y
+ 39, l$
) CALL Plot
(x
+ 5, y
+ 38, l$
) CALL Plot
(x
+ 3, y
+ 38, l$
) CALL HorizontalLine
(x
+ 3, x
+ 7, y
+ 1, l$
) CALL HorizontalLine
(x
+ 3, x
+ 7, y
+ 2, l$
) CALL Plot
(x
+ 7, y
+ 3, l$
) CALL VerticalLine
(y
+ 14, y
+ 17, x
+ 3, l$
) CALL Plot
(x
+ 4, y
+ 16, l$
) CALL Plot
(x
+ 1, y
+ 8, l$
) CALL VerticalLine
(y
+ 17, y
+ 19, x
+ 4, l$
) CALL VerticalLine
(y
+ 17, y
+ 20, x
+ 5, l$
) CALL VerticalLine
(y
+ 19, y
+ 21, x
+ 6, l$
) CALL VerticalLine
(y
+ 36, y
+ 38, x
+ 6, l$
) CALL VerticalLine
(y
+ 21, y
+ 23, x
+ 7, l$
) CALL VerticalLine
(y
+ 33, y
+ 37, x
+ 7, l$
) CALL Plot
(x
+ 8, y
+ 2, l$
) CALL Plot
(x
+ 8, y
+ 3, l$
) CALL VerticalLine
(y
+ 22, y
+ 26, x
+ 8, l$
) CALL VerticalLine
(y
+ 31, y
+ 35, x
+ 8, l$
) CALL VerticalLine
(y
+ 4, y
+ 5, x
+ 8, l$
) CALL VerticalLine
(y
+ 4, y
+ 5, x
+ 9, l$
) CALL VerticalLine
(y
+ 24, y
+ 32, x
+ 9, l$
)
makeAu:
CALL VerticalLine
(7, 17, 12, l$
) CALL VerticalLine
(7, 17, 13, l$
) CALL VerticalLine
(7, 17, 21, l$
) CALL VerticalLine
(7, 17, 20, l$
) CALL VerticalLine
(18, 39, 13, l$
) CALL VerticalLine
(18, 39, 14, l$
) CALL VerticalLine
(18, 39, 19, l$
) CALL VerticalLine
(18, 39, 20, l$
) CALL VerticalLine
(40, 43, 14, l$
) CALL VerticalLine
(40, 43, 19, l$
) CALL HorizontalLine
(15, 18, 44, l$
) CALL HorizontalLine
(15, 18, 43, l$
)
makeAc:
CALL Plot
(x
+ 2, y
+ 7, l$
) CALL Plot
(x
+ 3, y
+ 6, l$
) CALL VerticalLine
(y
+ 8, y
+ 32, x
, l$
) CALL VerticalLine
(y
+ 6, y
+ 35, x
+ 1, l$
) CALL VerticalLine
(y
+ 6, y
+ 10, x
+ 1, l$
) CALL VerticalLine
(y
+ 31, y
+ 34, x
+ 1, l$
) CALL VerticalLine
(y
+ 4, y
+ 6, x
+ 2, l$
) CALL VerticalLine
(y
+ 4, y
+ 6, x
+ 3, l$
) CALL VerticalLine
(y
+ 33, y
+ 38, x
+ 2, l$
) CALL Plot
(x
+ 3, y
+ 3, l$
) CALL Plot
(x
+ 3, y
+ 38, l$
) CALL Plot
(x
+ 3, y
+ 37, l$
) CALL Plot
(x
+ 3, y
+ 36, l$
) CALL HorizontalLine
(x
+ 4, x
+ 8, y
+ 2, l$
) CALL HorizontalLine
(x
+ 4, x
+ 8, y
+ 3, l$
) CALL HorizontalLine
(x
+ 4, x
+ 8, y
+ 39, l$
) CALL Plot
(x
+ 4, y
+ 37, l$
) CALL HorizontalLine
(x
+ 4, x
+ 8, y
+ 38, l$
) CALL Plot
(x
+ 9, y
+ 3, l$
) CALL Plot
(x
+ 9, y
+ 38, l$
)
makeAnE:
CALL VerticalLine
(3, 40, 45, l$
) CALL VerticalLine
(3, 40, 46, l$
) CALL HorizontalLine
(45, 54, 3, l$
) CALL HorizontalLine
(45, 54, 4, l$
) CALL HorizontalLine
(45, 52, 21, l$
) CALL HorizontalLine
(45, 53, 22, l$
) CALL HorizontalLine
(45, 54, 40, l$
) CALL HorizontalLine
(45, 54, 39, l$
)
done:
FUNCTION SarienWillHit
(goodGuysX
, goodGuysY
, badX
, badY
, badOrientation$
) IF goodGuysX
- 3 < badX
AND badX
< goodGuysX
+ 3 AND badY
> goodGuysY
THEN rtn = TRUE
rtn = FALSE
IF goodGuysX
- 3 < badX
AND badX
< goodGuysX
+ 3 AND badY
< goodGuysY
THEN rtn = TRUE
rtn = FALSE
IF goodGuysY
- 3 < badY
AND badY
< goodGuysY
AND badX
< goodGuysX
THEN rtn = TRUE
rtn = FALSE
IF goodGuysY
- 3 < badY
AND badY
< goodGuysY
AND badX
> goodGuysX
THEN rtn = TRUE
rtn = FALSE
SarienWillHit = rtn
FUNCTION IsEnemyHit
(bulletX
, bulletY
, enemyX
, enemyY
, enemyOrientation$
) IF bulletX
= enemyX
- 1 AND bulletY
= enemyY
THEN enemyIsHit = TRUE
enemyIsHit = TRUE
enemyIsHit = TRUE
enemyIsHit = FALSE
IF bulletX
= enemyX
AND bulletY
= enemyY
- 1 THEN enemyIsHit = TRUE
enemyIsHit = TRUE
enemyIsHit = TRUE
enemyIsHit = FALSE
IF bulletX
= enemyX
- 1 AND bulletY
= enemyY
THEN enemyIsHit = TRUE
enemyIsHit = TRUE
enemyIsHit = TRUE
enemyIsHit = FALSE
IF bulletX
= enemyX
AND bulletY
= enemyY
- 1 THEN enemyIsHit = TRUE
enemyIsHit = TRUE
enemyIsHit = TRUE
enemyIsHit = FALSE
IsEnemyHit = enemyIsHit
FUNCTION LocationGood
(wifranEspializer7x
, wifranEspializer7y
, badGuysX
, badGuysY
) wifLeftBorder = wifranEspializer7x - 30
wifTopBorder = wifranEspializer7y - 20
wifRightBorder = wifranEspializer7x + 30
wifBottomBorder = wifranEspializer7y + 20
IF wifLeftBorder
< badGuysX
AND badGuysX
< wifRightBorder
AND wifTopBorder
< badGuysY
AND badGuysY
< wifBottomBorder
THEN placementOK = FALSE
placementOK = TRUE
LocationGood = placementOK
SUB WaitForCharacter
(character$
) character$
= UCASE$(character$
) readCharacter$
= UCASE$(readCharacter$
)
GetCenter
= (80 - LEN(text$
)) / 2
DIM startingHole
AS coordinate
startingHole.x = Espializer7.x
startingHole.y = Espializer7.y
wormHoleLetter$
= CHR$(grid
(Espializer7.x
, Espializer7.y
, 1)) IF grid
(findingX
, findingY
, 1) = ASC(wormHoleLetter$
) THEN IF NOT (startingHole.x
= findingX
AND startingHole.y
= findingY
) THEN newX = findingX
newY = findingY
CALL DrawEspializer7
("N", 41, 44, FALSE
) ' true / false whether to erase the ship. PRINT " Espializer 7 into" CALL WaitForCharacter
(" ") 'move the espializer 7 into the wormhole
CALL DrawEspializer7
("N", 41, yPosition
, FALSE
) IF yPosition
MOD (movingShipMod
/ 2) = 0 THEN PLAY movingShipBeep$
CALL DrawEspializer7
("N", 41, yPosition
, TRUE
)
CALL DrawEspializer7
("S", 41, yPosition
, TRUE
)
'set the espializer at the new hole
Espializer7.x = newX
Espializer7.y = newY
CALL DrawEspializer7
("S", 41, 22, FALSE
) CALL DrawEspializer7
("S", 41, yPosition
, FALSE
) IF yPosition
MOD (movingShipMod
/ 2) = 0 THEN PLAY movingShipBeep$
CALL DrawEspializer7
("S", 41, yPosition
, TRUE
) PRINT "to the Galaxy Grid at" CALL WaitForCharacter
("r")
drawCircles:
' outer most circle
CALL HorizontalLine
(36, 44, 1, t$
) CALL HorizontalLine
(33, 35, 2, t$
) CALL HorizontalLine
(30, 32, 3, t$
) CALL HorizontalLine
(28, 29, 4, t$
) CALL HorizontalLine
(26, 27, 5, t$
) CALL HorizontalLine
(24, 25, 6, t$
) CALL VerticalLine
(9, 10, 21, t$
) CALL VerticalLine
(12, 13, 19, t$
) CALL VerticalLine
(14, 15, 18, t$
) CALL VerticalLine
(16, 18, 17, t$
) CALL VerticalLine
(19, 30, 16, t$
) CALL VerticalLine
(31, 33, 17, t$
) CALL VerticalLine
(34, 35, 18, t$
) CALL VerticalLine
(36, 37, 19, t$
) CALL VerticalLine
(39, 40, 21, t$
) CALL HorizontalLine
(24, 25, 43, t$
) CALL HorizontalLine
(26, 27, 44, t$
) CALL HorizontalLine
(28, 29, 45, t$
) CALL HorizontalLine
(30, 32, 46, t$
) CALL HorizontalLine
(33, 35, 47, t$
) CALL HorizontalLine
(36, 44, 48, t$
) CALL HorizontalLine
(45, 47, 2, t$
) CALL HorizontalLine
(48, 50, 3, t$
) CALL HorizontalLine
(51, 52, 4, t$
) CALL HorizontalLine
(53, 54, 5, t$
) CALL HorizontalLine
(55, 56, 6, t$
) CALL VerticalLine
(9, 10, 59, t$
) CALL VerticalLine
(12, 13, 61, t$
) CALL VerticalLine
(14, 15, 62, t$
) CALL VerticalLine
(16, 18, 63, t$
) CALL VerticalLine
(19, 30, 64, t$
) CALL VerticalLine
(31, 33, 63, t$
) CALL VerticalLine
(34, 35, 62, t$
) CALL VerticalLine
(36, 37, 61, t$
) CALL VerticalLine
(39, 40, 59, t$
) CALL HorizontalLine
(55, 56, 43, t$
) CALL HorizontalLine
(53, 54, 44, t$
) CALL HorizontalLine
(51, 52, 45, t$
) CALL HorizontalLine
(48, 50, 46, t$
) CALL HorizontalLine
(45, 47, 47, t$
)
'Second circle
CALL HorizontalLine
(38, 44, 6, t$
) 'top CALL HorizontalLine
(38, 44, 43, t$
) 'bottom CALL HorizontalLine
(34, 37, 7, t$
) CALL HorizontalLine
(34, 37, 42, t$
) CALL HorizontalLine
(45, 48, 42, t$
) CALL HorizontalLine
(45, 48, 7, t$
) CALL HorizontalLine
(32, 33, 8, t$
) CALL HorizontalLine
(49, 50, 8, t$
) CALL HorizontalLine
(32, 33, 41, t$
) CALL HorizontalLine
(49, 50, 41, t$
) CALL HorizontalLine
(29, 30, 10, t$
) CALL HorizontalLine
(52, 53, 10, t$
) CALL HorizontalLine
(29, 30, 39, t$
) CALL HorizontalLine
(52, 53, 39, t$
) CALL VerticalLine
(13, 14, 26, t$
) CALL VerticalLine
(13, 14, 56, t$
) CALL VerticalLine
(35, 36, 26, t$
) CALL VerticalLine
(35, 36, 56, t$
) CALL VerticalLine
(15, 16, 25, t$
) CALL VerticalLine
(15, 16, 57, t$
) CALL VerticalLine
(33, 34, 25, t$
) CALL VerticalLine
(33, 34, 57, t$
) CALL VerticalLine
(17, 18, 24, t$
) CALL VerticalLine
(17, 18, 58, t$
) CALL VerticalLine
(31, 32, 24, t$
) CALL VerticalLine
(31, 32, 58, t$
) CALL VerticalLine
(19, 22, 23, t$
) CALL VerticalLine
(19, 22, 59, t$
) CALL VerticalLine
(27, 30, 23, t$
) CALL VerticalLine
(27, 30, 59, t$
) CALL VerticalLine
(23, 26, 22, t$
) CALL VerticalLine
(23, 26, 60, t$
)
'Third circle
CALL HorizontalLine
(39, 43, 11, t$
) 'top CALL HorizontalLine
(39, 43, 38, t$
) 'bottom CALL HorizontalLine
(36, 38, 12, t$
) CALL HorizontalLine
(44, 46, 12, t$
) CALL HorizontalLine
(36, 38, 37, t$
) CALL HorizontalLine
(44, 46, 37, t$
) CALL HorizontalLine
(34, 35, 13, t$
) CALL HorizontalLine
(47, 48, 13, t$
) CALL HorizontalLine
(34, 35, 36, t$
) CALL HorizontalLine
(47, 48, 36, t$
) CALL VerticalLine
(18, 19, 29, t$
) CALL VerticalLine
(18, 19, 53, t$
) CALL VerticalLine
(30, 31, 29, t$
) CALL VerticalLine
(30, 31, 53, t$
) CALL VerticalLine
(20, 22, 28, t$
) CALL VerticalLine
(20, 22, 54, t$
) CALL VerticalLine
(27, 29, 28, t$
) CALL VerticalLine
(27, 29, 54, t$
) CALL VerticalLine
(23, 26, 27, t$
) CALL VerticalLine
(23, 26, 55, t$
)
'inner most circle
CALL HorizontalLine
(39, 44, 16, t$
) CALL HorizontalLine
(39, 44, 34, t$
) CALL HorizontalLine
(37, 38, 17, t$
) CALL HorizontalLine
(45, 46, 17, t$
) CALL HorizontalLine
(37, 38, 33, t$
) CALL HorizontalLine
(45, 46, 33, t$
) CALL HorizontalLine
(35, 36, 18, t$
) CALL HorizontalLine
(47, 48, 18, t$
) CALL HorizontalLine
(35, 36, 32, t$
) CALL HorizontalLine
(47, 48, 32, t$
) CALL VerticalLine
(19, 22, 34, t$
) CALL VerticalLine
(19, 22, 49, t$
) CALL VerticalLine
(28, 31, 34, t$
) CALL VerticalLine
(28, 31, 49, t$
) CALL VerticalLine
(24, 26, 32, t$
) CALL VerticalLine
(24, 26, 51, t$
)
endWormHoleSUB:
SUB DrawEspializer7
(direction$
, centerX
, centerY
, eraseShip
) CALL VerticalLine
(centerY
, centerY
+ 4, centerX
- 3, t$
) CALL VerticalLine
(centerY
, centerY
+ 4, centerX
+ 3, t$
) CALL VerticalLine
(centerY
- 2, centerY
, centerX
- 2, t$
) CALL VerticalLine
(centerY
- 2, centerY
, centerX
+ 2, t$
) CALL VerticalLine
(centerY
- 3, centerY
- 1, centerX
- 1, t$
) CALL VerticalLine
(centerY
- 3, centerY
- 1, centerX
+ 1, t$
) CALL VerticalLine
(centerY
- 4, centerY
- 1, centerX
, t$
) CALL VerticalLine
(centerY
- 4, centerY
, centerX
- 3, t$
) CALL VerticalLine
(centerY
- 4, centerY
, centerX
+ 3, t$
) CALL VerticalLine
(centerY
, centerY
+ 2, centerX
- 2, t$
) CALL VerticalLine
(centerY
, centerY
+ 2, centerX
+ 2, t$
) CALL VerticalLine
(centerY
+ 1, centerY
+ 3, centerX
- 1, t$
) CALL VerticalLine
(centerY
+ 1, centerY
+ 3, centerX
+ 1, t$
) CALL VerticalLine
(centerY
+ 1, centerY
+ 4, centerX
, t$
) CALL HorizontalLine
(centerX
- 4, centerX
, centerY
- 3, t$
) CALL HorizontalLine
(centerX
- 4, centerX
, centerY
+ 3, t$
) CALL HorizontalLine
(centerX
, centerX
+ 2, centerY
- 2, t$
) CALL HorizontalLine
(centerX
, centerX
+ 2, centerY
+ 2, t$
) CALL HorizontalLine
(centerX
+ 1, centerX
+ 3, centerY
- 1, t$
) CALL HorizontalLine
(centerX
+ 1, centerX
+ 3, centerY
+ 1, t$
) CALL HorizontalLine
(centerX
+ 1, centerX
+ 4, centerY
, t$
) CALL HorizontalLine
(centerX
, centerX
+ 4, centerY
- 3, t$
) CALL HorizontalLine
(centerX
, centerX
+ 4, centerY
+ 3, t$
) CALL HorizontalLine
(centerX
- 2, centerX
, centerY
- 2, t$
) CALL HorizontalLine
(centerX
- 2, centerX
, centerY
+ 2, t$
) CALL HorizontalLine
(centerX
- 3, centerX
- 1, centerY
- 1, t$
) CALL HorizontalLine
(centerX
- 3, centerX
- 1, centerY
+ 1, t$
) CALL HorizontalLine
(centerX
- 4, centerX
- 1, centerY
, t$
)
SUB HorizontalLine
(starting
, ending
, vertical
, character$
) FOR drawing
= starting
TO ending
SUB VerticalLine
(starting
, ending
, horizontal
, character$
) FOR drawing
= starting
TO ending
SUB Plot
(horizontal
, vertical
, character$
)
SUB PlayGalaxyGrid
(loadYN$
) gameInProgress = TRUE
tabPushed = 0
pauseExecution = TRUE
pauseExecution = FALSE
pauseExecution = TRUE
LOCATE Espializer7.y
, Espializer7.x
Espializer7.y = Espializer7.y - 1
fleetJumpsWhenThisReaches0 = fleetJumpsWhenThisReaches0 - 1
tabPushed = 0
shipLog.moves = shipLog.moves + 1
pauseExecution = TRUE
LOCATE Espializer7.y
, Espializer7.x
Espializer7.x = Espializer7.x - 1
fleetJumpsWhenThisReaches0 = fleetJumpsWhenThisReaches0 - 1
tabPushed = 0
shipLog.moves = shipLog.moves + 1
pauseExecution = TRUE
LOCATE Espializer7.y
, Espializer7.x
Espializer7.y = Espializer7.y + 1
fleetJumpsWhenThisReaches0 = fleetJumpsWhenThisReaches0 - 1
tabPushed = 0
shipLog.moves = shipLog.moves + 1
pauseExecution = TRUE
LOCATE Espializer7.y
, Espializer7.x
Espializer7.x = Espializer7.x + 1
fleetJumpsWhenThisReaches0 = fleetJumpsWhenThisReaches0 - 1
tabPushed = 0
shipLog.moves = shipLog.moves + 1
PRINT "Are you sure you want to exit? ";
tabPushed = 1
tabToggle = 2
tabToggle = 3
tabToggle = 1
IF pauseExecution
= TRUE
AND tabPushed
= 0 THEN IF fleetJumpsWhenThisReaches0
= 0 THEN max = 40
min = 20
jump
= INT(RND * (max
- min
+ 1)) + min
fleetJumpsWhenThisReaches0 = jump
CASE 65, 66, 67, 68, 69, 70, 71, 72, 73, 74 IF grid
(Espializer7.x
, Espializer7.y
, 3) <> 0 THEN CALL Battle
(0) IF grid
(Espializer7.x
, Espializer7.y
, 3) <> 0 THEN CALL AidDisabledShip
CASE Top.code
, Bottom.code
IF grid
(Espializer7.x
, Espializer7.y
, 3) <> 0 THEN CALL DockForInfo
'find the top left coordinate
x = 0
y = 0
FOR locateFleetX
= 1 TO 79 FOR locateFleetY
= 1 TO 44 IF grid
(locateFleetX
, locateFleetY
, 1) = sarienFleet.code
THEN x = locateFleetX
y = locateFleetY
willNotFit:
'find a new place for the fleet
xTry = RNX
IF xTry
>= 80 THEN xTry
= xTry
- 1 yTry = RNY
IF yTry
>= 45 THEN yTry
= yTry
- 1 IF grid
(xTry
, yTry
, 1) = 0 AND grid
(xTry
+ 1, yTry
, 1) = 0 AND grid
(xTry
, yTry
+ 1, 1) = 0 AND grid
(xTry
+ 1, yTry
+ 1, 1) = 0 THEN 'reposition the fleet
grid(xTry, yTry, 1) = sarienFleet.code
grid(xTry, yTry, 2) = sarienFleet.clr
grid(xTry, yTry, 3) = grid(x, y, 3)
grid(xTry + 1, yTry, 1) = sarienFleet.code
grid(xTry + 1, yTry, 2) = sarienFleet.clr
grid(xTry + 1, yTry, 3) = grid(x + 1, y, 3)
grid(xTry, yTry + 1, 1) = sarienFleet.code
grid(xTry, yTry + 1, 2) = sarienFleet.clr
grid(xTry, yTry + 1, 3) = grid(x, y + 1, 3)
grid(xTry + 1, yTry + 1, 1) = sarienFleet.code
grid(xTry + 1, yTry + 1, 2) = sarienFleet.clr
grid(xTry + 1, yTry + 1, 3) = grid(x + 1, y + 1, 3)
'deduct a point or two so the fewer moves the slightly higher score
shipLog.score = shipLog.score - 1
'remove the previous fleet location from the grid
grid(x, y, 1) = 0
grid(x, y, 2) = 0
grid(x, y, 3) = 0
grid(x + 1, y, 1) = 0
grid(x + 1, y, 2) = 0
grid(x + 1, y, 3) = 0
grid(x, y + 1, 1) = 0
grid(x, y + 1, 2) = 0
grid(x, y + 1, 3) = 0
grid(x + 1, y + 1, 1) = 0
grid(x + 1, y + 1, 2) = 0
grid(x + 1, y + 1, 3) = 0
'Draw the ocean part of the planet
CALL HorizontalLine
(1, 32, 45, CHR$(219)) CALL HorizontalLine
(2, 32, 44, CHR$(219)) CALL HorizontalLine
(3, 33, 43, CHR$(219)) CALL HorizontalLine
(4, 33, 42, CHR$(219)) CALL HorizontalLine
(6, 34, 41, CHR$(219)) CALL HorizontalLine
(7, 34, 40, CHR$(219)) CALL HorizontalLine
(8, 35, 39, CHR$(219)) CALL HorizontalLine
(10, 36, 38, CHR$(219)) CALL HorizontalLine
(12, 37, 37, CHR$(219)) CALL HorizontalLine
(13, 39, 36, CHR$(219)) CALL HorizontalLine
(68, 69, 36, CHR$(219)) CALL HorizontalLine
(15, 41, 35, CHR$(219)) CALL HorizontalLine
(53, 69, 35, CHR$(219)) CALL HorizontalLine
(16, 45, 34, CHR$(219)) CALL HorizontalLine
(50, 68, 34, CHR$(219)) CALL HorizontalLine
(18, 67, 33, CHR$(219)) CALL HorizontalLine
(20, 65, 32, CHR$(219)) CALL HorizontalLine
(22, 64, 31, CHR$(219)) CALL HorizontalLine
(24, 62, 30, CHR$(219)) CALL HorizontalLine
(26, 60, 29, CHR$(219)) CALL HorizontalLine
(28, 58, 28, CHR$(219)) CALL HorizontalLine
(31, 56, 27, CHR$(219)) CALL HorizontalLine
(35, 53, 26, CHR$(219)) CALL HorizontalLine
(40, 50, 25, CHR$(219))
'Draw the forest part of the planet
CALL HorizontalLine
(33, 52, 45, CHR$(219)) CALL HorizontalLine
(33, 53, 44, CHR$(219)) CALL HorizontalLine
(34, 54, 43, CHR$(219)) CALL HorizontalLine
(34, 55, 42, CHR$(219)) CALL HorizontalLine
(35, 56, 41, CHR$(219)) CALL HorizontalLine
(35, 57, 40, CHR$(219)) CALL HorizontalLine
(36, 65, 39, CHR$(219)) CALL HorizontalLine
(37, 67, 38, CHR$(219)) CALL HorizontalLine
(38, 70, 37, CHR$(219)) CALL HorizontalLine
(40, 67, 36, CHR$(219)) CALL HorizontalLine
(42, 52, 35, CHR$(219)) CALL HorizontalLine
(46, 49, 34, CHR$(219))
'Draw the dirt/other colored land part of the planet
CALL HorizontalLine
(53, 80, 45, CHR$(219)) CALL HorizontalLine
(54, 79, 44, CHR$(219)) CALL HorizontalLine
(55, 78, 43, CHR$(219)) CALL HorizontalLine
(56, 77, 42, CHR$(219)) CALL HorizontalLine
(57, 76, 41, CHR$(219)) CALL HorizontalLine
(58, 75, 40, CHR$(219)) CALL HorizontalLine
(66, 74, 39, CHR$(219)) CALL HorizontalLine
(68, 73, 38, CHR$(219)) CALL HorizontalLine
(71, 72, 37, CHR$(219)) 'Draw the Espializer7 in the upper left portion of the screen
CALL DrawEspializer7
("E", 5, 6, 0) 'Display message
a$ = "The Espializer 7 is near a Wifran colony."
LOCATE 9, GetCenter
("push tspacebarj to take up orbit") PRINT " to take up orbit." 'Move the Espializer7 to transporter range
CALL DrawEspializer7
("E", x
, 6, 0) CALL DrawEspializer7
("E", x
, 6, 1) 'reprint the Espializer7 to prepare for transport
CALL DrawEspializer7
("S", 75, 5, 0) a$ = "Push [esc] to hail the colony."
PRINT " to hail the colony." ClearStatus
availableHomes = grid(Espializer7.x, Espializer7.y, 3)
IF availableHomes
= -1 THEN availableHomes
= 0 pplAboard = shipLog.currentSurvivors
shipLog.morale = shipLog.morale - 10
shipLog.score = shipLog.score - 30
shipLog.totalMorale = shipLog.totalMorale - 10
ClearStatus
a$ = "The colonists are irritated that you disturbed them."
a$ = "You have no survivors on board."
b$ = "Penalty of -10 morale and -30 score applied."
LOCATE 23, GetCenter
("Push -x- to return to the galaxy grid.") PRINT "eturn to the Galaxy Grid." CALL WaitForCharacter
("r") IF availableHomes
>= pplAboard
THEN ppltoBeam = pplAboard
ppltoBeam = availableHomes
a$ = "The colonists say they can accomodate # survivor"
ap = GetCenter(a$ + ".")
a$ = a$ + "s."
a$ = a$ + "."
ClearStatus
a$ = "These colonists cannot assist you at this time."
LOCATE 10, GetCenter
("Push 'r' to return to the grid.") PRINT "eturn to the Galaxy Grid." CALL WaitForCharacter
("r") grid(Espializer7.x, Espializer7.y, 3) = grid(Espializer7.x, Espializer7.y, 3) - ppltoBeam
IF grid
(Espializer7.x
, Espializer7.y
, 3) = 0 THEN grid
(Espializer7.x
, Espializer7.y
, 3) = -1 shipLog.totalSurvivorsSaved = shipLog.totalSurvivorsSaved + ppltoBeam
shipLog.morale = shipLog.morale + (ppltoBeam * 30)
shipLog.totalMorale = shipLog.totalMorale + shipLog.morale
shipLog.score = shipLog.score + (ppltoBeam * 30)
a$ = "push -b- to beam survivor ## to the surface."
ap = GetCenter(a$)
FOR people
= 1 TO ppltoBeam
PRINT " to the surface. " CALL WaitForCharacter
("b") shipLog.currentSurvivors = shipLog.currentSurvivors - 1
availableHomes = availableHomes - 1
a$ = "The colonists say they can accomodate # survivor"
ap = GetCenter(a$ + ".")
a$ = a$ + "s."
a$ = a$ + ". "
CALL HorizontalLine
(74, 76, y
+ 1, CHR$(219)) CALL HorizontalLine
(73, 77, y
+ 2, CHR$(219)) CALL HorizontalLine
(74, 76, y
+ 3, CHR$(219)) CALL HorizontalLine
(74, 76, y
+ 4, CHR$(219)) CALL HorizontalLine
(74, 76, y
+ 5, CHR$(219)) CALL HorizontalLine
(73, 74, y
+ 7, CHR$(219)) CALL HorizontalLine
(76, 77, y
+ 7, CHR$(219)) CALL HorizontalLine
(74, 76, y
+ 1, CHR$(219)) CALL HorizontalLine
(73, 77, y
+ 2, CHR$(219)) CALL HorizontalLine
(74, 76, y
+ 3, CHR$(219)) CALL HorizontalLine
(74, 76, y
+ 4, CHR$(219)) CALL HorizontalLine
(74, 76, y
+ 5, CHR$(219)) CALL HorizontalLine
(73, 74, y
+ 7, CHR$(219)) CALL HorizontalLine
(76, 77, y
+ 7, CHR$(219)) ClearStatus
LOCATE 48, GetCenter
("Push 'r' to return to the grid.") PRINT "eturn to the Galaxy Grid." CALL WaitForCharacter
("r") EndOfSub:
a$ = message$
ab = GetCenter(a$)
'Espializer 7 in the center of the screen
useDelay = 0.5
c$ = t$
CALL VerticalLine
(26, 30, 37, t$
) CALL VerticalLine
(26, 30, 43, t$
) CALL VerticalLine
(22, 25, 40, t$
) CALL VerticalLine
(23, 25, 41, t$
) CALL VerticalLine
(23, 25, 39, t$
) CALL VerticalLine
(24, 26, 38, t$
) CALL VerticalLine
(24, 26, 42, t$
)
'circle to blot out the ship. first of the concussive blasts
circlesDelay = 0.1
FirstCircle: 'innermost to outer
CALL HorizontalLine
(39, 41, 18, t$
) CALL HorizontalLine
(36, 44, 19, t$
) CALL HorizontalLine
(35, 45, 20, t$
) CALL HorizontalLine
(34, 46, 21, t$
) CALL HorizontalLine
(34, 46, 22, t$
) CALL HorizontalLine
(33, 47, 23, t$
) CALL HorizontalLine
(33, 47, 24, t$
) CALL HorizontalLine
(33, 47, 25, t$
) CALL HorizontalLine
(33, 47, 26, t$
) CALL HorizontalLine
(33, 47, 27, t$
) CALL HorizontalLine
(34, 46, 28, t$
) CALL HorizontalLine
(35, 45, 29, t$
) CALL HorizontalLine
(36, 44, 30, t$
) CALL HorizontalLine
(37, 43, 31, t$
) CALL HorizontalLine
(39, 41, 32, t$
)
SecondCircle:
CALL HorizontalLine
(38, 42, 11, t$
) CALL HorizontalLine
(35, 45, 12, t$
) CALL HorizontalLine
(33, 47, 13, t$
) CALL HorizontalLine
(32, 48, 14, t$
) CALL HorizontalLine
(31, 49, 15, t$
) CALL HorizontalLine
(30, 50, 16, t$
) CALL HorizontalLine
(29, 51, 17, t$
) CALL HorizontalLine
(28, 52, 18, t$
) CALL HorizontalLine
(28, 52, 19, t$
) CALL HorizontalLine
(27, 53, 20, t$
) CALL HorizontalLine
(27, 53, 21, t$
) hLeft = 26
hRight = 53
CALL HorizontalLine
(hLeft
, hRight
, yPos
, t$
) CALL HorizontalLine
(27, 52, 29, t$
) CALL HorizontalLine
(27, 52, 30, t$
) CALL HorizontalLine
(28, 51, 31, t$
) CALL HorizontalLine
(28, 51, 32, t$
) CALL HorizontalLine
(29, 50, 33, t$
) CALL HorizontalLine
(30, 49, 34, t$
) CALL HorizontalLine
(30, 49, 35, t$
) CALL HorizontalLine
(31, 48, 36, t$
) CALL HorizontalLine
(32, 48, 37, t$
) CALL HorizontalLine
(34, 46, 38, t$
) CALL HorizontalLine
(47, 43, 39, t$
)
ThirdCircle:
CALL HorizontalLine
(38, 43, 4, t$
) CALL HorizontalLine
(34, 48, 5, t$
) CALL HorizontalLine
(31, 50, 6, t$
) CALL HorizontalLine
(30, 51, 7, t$
) h1 = 28
h2 = 53
CALL HorizontalLine
(h1
, h2
, vPos
, t$
) h1 = h1 - 1
h2 = h2 + 1
CALL HorizontalLine
(23, 58, 14, t$
) CALL HorizontalLine
(22, 59, 15, t$
) CALL HorizontalLine
(22, 59, 16, t$
) CALL HorizontalLine
(21, 60, vPos
, t$
) CALL HorizontalLine
(21, 60, vPos
+ 12, t$
) CALL HorizontalLine
(20, 61, vPos
, t$
) CALL HorizontalLine
(21, 60, vPos
, t$
) CALL HorizontalLine
(22, 59, 34, t$
) CALL HorizontalLine
(22, 59, 35, t$
) CALL HorizontalLine
(23, 58, 36, t$
) h1 = 23
h2 = 58
CALL HorizontalLine
(h1
, h2
, vPos
, t$
) h1 = h1 + 1
h2 = h2 - 1
CALL HorizontalLine
(30, 51, 43, t$
) CALL HorizontalLine
(31, 50, 44, t$
) CALL HorizontalLine
(34, 48, 45, t$
) ' CALL HorizontalLine(38, 43, 47, t$)
FourthCircle:
CALL HorizontalLine
(33, 46, 2, t$
) CALL HorizontalLine
(30, 51, 3, t$
) CALL HorizontalLine
(29, 53, 4, t$
) CALL HorizontalLine
(28, 54, 5, t$
) CALL HorizontalLine
(26, 56, 6, t$
) CALL HorizontalLine
(25, 57, 7, t$
) CALL HorizontalLine
(24, 58, 8, t$
) CALL HorizontalLine
(22, 60, 9, t$
) CALL HorizontalLine
(22, 60, 10, t$
) CALL HorizontalLine
(21, 61, 11, t$
) CALL HorizontalLine
(20, 62, 12, t$
) CALL HorizontalLine
(19, 63, 13, t$
) CALL HorizontalLine
(19, 63, 14, t$
) CALL HorizontalLine
(18, 64, 15, t$
) CALL HorizontalLine
(18, 64, 16, t$
) CALL HorizontalLine
(17, 65, 17, t$
) CALL HorizontalLine
(17, 65, 18, t$
) CALL HorizontalLine
(17, 65, 19, t$
) CALL HorizontalLine
(16, 66, vPos
, t$
) CALL HorizontalLine
(17, 65, 30, t$
) CALL HorizontalLine
(17, 65, 31, t$
) CALL HorizontalLine
(17, 65, 32, t$
) CALL HorizontalLine
(18, 64, 33, t$
) CALL HorizontalLine
(18, 64, 34, t$
) CALL HorizontalLine
(19, 63, 35, t$
) CALL HorizontalLine
(19, 63, 36, t$
) CALL HorizontalLine
(20, 62, 37, t$
) CALL HorizontalLine
(21, 61, 38, t$
) CALL HorizontalLine
(22, 60, 39, t$
) CALL HorizontalLine
(22, 60, 40, t$
) CALL HorizontalLine
(24, 58, 41, t$
) CALL HorizontalLine
(25, 57, 42, t$
) CALL HorizontalLine
(26, 56, 43, t$
) CALL HorizontalLine
(28, 54, 44, t$
) CALL HorizontalLine
(29, 53, 45, t$
) CALL HorizontalLine
(30, 52, 46, t$
) CALL HorizontalLine
(33, 49, 47, t$
)
Flash:
'Flash -- Old PC wouln't run this loop among other parts of this code. Needed a new gaming PC anyway
useDelay = 0.1
'B
B:
Bdelay = 0.025
Bdelay1 = 0.01
CALL Plot
(18, vPos
, t$
) '1 CALL Plot
(hPos
, 3, t$
) '2 CALL HorizontalLine
(32, 34, 4, t$
) '3 CALL HorizontalLine
(35, 36, 5, t$
) '4 CALL VerticalLine
(8, 9, 39, t$
) '7 CALL VerticalLine
(10, 12, 40, t$
) '8 CALL VerticalLine
(13, 15, 41, t$
) '9 CALL VerticalLine
(16, 18, 40, t$
) '10 CALL VerticalLine
(19, 20, 39, t$
) '11 CALL Plot
(38, 21, t$
) '12 CALL Plot
(37, 22, t$
) '13 CALL HorizontalLine
(35, 36, 23, t$
) '14 CALL HorizontalLine
(32, 34, 24, t$
) '15 CALL HorizontalLine
(19, 31, 25, t$
) '16 CALL HorizontalLine
(32, 34, 26, t$
) '17 CALL HorizontalLine
(35, 36, 27, t$
) '18 CALL Plot
(37, 28, t$
) '19 CALL Plot
(38, 29, t$
) '20 CALL VerticalLine
(30, 31, 39, t$
) '21 CALL VerticalLine
(32, 34, 40, t$
) '22 CALL VerticalLine
(35, 37, 41, t$
) '23 CALL VerticalLine
(38, 40, 40, t$
) '24 CALL VerticalLine
(41, 42, 39, t$
) '25 CALL Plot
(38, 43, t$
) '26 CALL Plot
(37, 44, t$
) '27 CALL HorizontalLine
(35, 36, 45, t$
) '28 CALL HorizontalLine
(32, 34, 46, t$
) '29 CALL Plot
(hPos
, 47, t$
) '30
O:
Odelay = 0.025
CALL HorizontalLine
(37, 43, 3, t$
) '1 CALL HorizontalLine
(34, 36, 4, t$
) '2 CALL HorizontalLine
(31, 33, 5, t$
) '3 CALL HorizontalLine
(29, 30, 6, t$
) '4 CALL HorizontalLine
(27, 28, 7, t$
) '5 CALL VerticalLine
(10, 11, 24, t$
) '8 CALL VerticalLine
(13, 14, 22, t$
) '10 CALL VerticalLine
(15, 16, 21, t$
) '11 CALL VerticalLine
(17, 18, 20, t$
) '12 CALL VerticalLine
(19, 22, 19, t$
) '13 CALL VerticalLine
(23, 27, 18, t$
) '14 CALL VerticalLine
(28, 31, 19, t$
) '15 CALL VerticalLine
(32, 33, 20, t$
) '16 CALL VerticalLine
(36, 37, 22, t$
) '16_2 -- transferring from graph paper to code, i missed two lines CALL VerticalLine
(34, 35, 21, t$
) '17 CALL Plot
(23, 38, t$
) '18 CALL Plot
(25, 41, t$
) ' 18_2 CALL VerticalLine
(39, 40, 24, t$
) '19 CALL Plot
(26, 42, t$
) '20 CALL HorizontalLine
(27, 28, 43, t$
) '21 CALL HorizontalLine
(29, 30, 44, t$
) '22 CALL HorizontalLine
(31, 33, 45, t$
) '23 CALL HorizontalLine
(34, 36, 46, t$
) '24 CALL HorizontalLine
(37, 43, 47, t$
) '25 CALL HorizontalLine
(44, 46, 46, t$
) '26 CALL HorizontalLine
(47, 49, 45, t$
) '27 CALL HorizontalLine
(50, 51, 44, t$
) '28 CALL HorizontalLine
(52, 53, 43, t$
) '29 CALL Plot
(54, 42, t$
) '30 CALL Plot
(55, 41, t$
) '31 CALL VerticalLine
(39, 40, 56, t$
) '32 CALL Plot
(57, 38, t$
) '33 CALL VerticalLine
(36, 37, 58, t$
) '34 CALL VerticalLine
(34, 35, 59, t$
) '35 CALL VerticalLine
(32, 33, 60, t$
) '36 CALL VerticalLine
(28, 31, 61, t$
) '37 CALL VerticalLine
(23, 27, 62, t$
) '38 CALL VerticalLine
(19, 22, 61, t$
) '39 CALL VerticalLine
(17, 18, 60, t$
) '40 CALL VerticalLine
(15, 16, 59, t$
) '41 CALL VerticalLine
(13, 14, 58, t$
) '42 CALL Plot
(57, 12, t$
) '43 CALL VerticalLine
(10, 11, 56, t$
) '44 CALL HorizontalLine
(52, 53, 7, t$
) '47 CALL HorizontalLine
(50, 51, 6, t$
) '48 CALL HorizontalLine
(47, 49, 5, t$
) '49 CALL HorizontalLine
(44, 46, 4, t$
)
'M
M: Mdelay = 0.017
hPos = 19
CALL Plot
(hPos
, vPos
, t$
) hPos = hPos + 1
CALL Plot
(hPos
, vPos
, t$
) hPos = hPos + 1
BoomDenouement:
Red = 4
Orange = 6
Yellow = 14
BrightRed = 12
usingDelay = 0.33
PLAY "MBL32O1CDEFGABL40O2CDEFGAB48O3CDEFGABL56O4CDEFGAB" PLAY "MBL64O0CDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDECDE" shipLog.ships = shipLog.ships - 1
shipLog.score = shipLog.score - 300
shipLog.morale = 0
shipLog.currentMedSupply = 0
shipLog.currentSurvivors = 0
shipLog.currentDamage.ship = 0
shipLog.currentDamage.medical = 0
PRINT LongCenter$
("Your ship was destroyed. You are the sole survivor. You did not go down with the ship. I say " + CHR$(34) + "Shame on you!" + CHR$(34) + " Luckily, you convinced your superiors that you are honorable because of your ability to survive. Anyway, you are now in command of your second Espializer 7.") PRINT LongCenter$
("Your ship was destroyed. You are the sole survivor. You did not go down with the ship. I say " + CHR$(34) + "Shame on you!" + CHR$(34) + " Luckily, you convinced your superiors that you are honorable (again!) because of your ability to survive. Anyway, you are now in command of your second Espializer 7. Be cautious. You will not get a another ship.") LOCATE 48, GetCenter
("Push 'r' to return to the grid.") PRINT "eturn to the Galaxy Grid." CALL WaitForCharacter
("r")
PRINT "Oh no! Your ship has fallen in to the gravity well of a black hole!" CALL WaitForCharacter
(" ") PLAY "MBL5O5BAGFEDCL14O4BAGFEDCL22O3BAGFEDCO2L30BAGFEDCL38O1BAGFEDCL45O0BAGFEDC"
'now the hard part. moving the ship through the blackhole
CALL DrawEspializer7
("N", x
, 5, 0) _DELAY (movingShipDelay
* 1.5) CALL DrawEspializer7
("N", x
, 5, 1) CALL DrawEspializer7
("E", x
, 5, 0) _DELAY (movingShipDelay
* 1.5) CALL DrawEspializer7
("E", x
, 5, 1) CALL DrawEspializer7
("S", 50, y
, 0) _DELAY (movingShipDelay
* 1.5) CALL DrawEspializer7
("S", 50, y
, 1) CALL DrawEspializer7
("S", x
, 9, 0) _DELAY (movingShipDelay
* 1.5) CALL DrawEspializer7
("S", x
, 9, 1) CALL DrawEspializer7
("S", 54, y
, 0) _DELAY (movingShipDelay
* 1.4) CALL DrawEspializer7
("S", 54, y
, 1) CALL DrawEspializer7
("W", 55, y
, 0) _DELAY (movingShipDelay
* 1.4) CALL DrawEspializer7
("W", 55, y
, 1) CALL DrawEspializer7
("W", 56, y
, 0) _DELAY (movingShipDelay
* 1.4) CALL DrawEspializer7
("W", 56, y
, 1) CALL DrawEspializer7
("N", 57, y
, 0) _DELAY (movingShipDelay
* 1.3) CALL DrawEspializer7
("N", 57, y
, 1) CALL DrawEspializer7
("E", 56, y
, 0) _DELAY (movingShipDelay
* 1.3) CALL DrawEspializer7
("E", 56, y
, 1) CALL DrawEspializer7
("E", x
, 34, 0) _DELAY (movingShipDelay
* 1.2) CALL DrawEspializer7
("E", x
, 34, 1) CALL DrawEspializer7
("E", 52, y
, 0) _DELAY (movingShipDelay
* 1.1) CALL DrawEspializer7
("E", 52, y
, 1) CALL DrawEspializer7
("S", x
, 37, 0) _DELAY (movingShipDelay
* 1.1) CALL DrawEspializer7
("S", x
, 37, 1) CALL DrawEspializer7
("S", x
, 38, 0) _DELAY (movingShipDelay
* 1.1) CALL DrawEspializer7
("S", x
, 38, 1) CALL DrawEspializer7
("W", x
, 39, 0) CALL DrawEspializer7
("W", x
, 39, 1) CALL DrawEspializer7
("W", x
, 38, 0) CALL DrawEspializer7
("W", x
, 38, 1) CALL DrawEspializer7
("N", 36, 37, 0) CALL DrawEspializer7
("N", 36, 37, 1) CALL DrawEspializer7
("N", 35, 36, 0) CALL DrawEspializer7
("N", 35, 36, 1) CALL DrawEspializer7
("N", 34, 35, 0) _DELAY (movingShipDelay
* 0.9) CALL DrawEspializer7
("N", 34, 35, 1) CALL DrawEspializer7
("N", 33, 34, 0) _DELAY (movingShipDelay
* 0.9) CALL DrawEspializer7
("N", 33, 34, 1) CALL DrawEspializer7
("E", 32, y
, 0) _DELAY (movingShipDelay
* 0.9) CALL DrawEspializer7
("E", 32, y
, 1) CALL DrawEspializer7
("E", 31, y
, 0) _DELAY (movingShipDelay
* 0.8) CALL DrawEspializer7
("E", 31, y
, 1) CALL DrawEspializer7
("S", 30, y
, 0) _DELAY (movingShipDelay
* 0.8) CALL DrawEspializer7
("S", 30, y
, 1) CALL DrawEspializer7
("S", 31, y
, 0) _DELAY (movingShipDelay
* 0.8) CALL DrawEspializer7
("S", 31, y
, 1) CALL DrawEspializer7
("W", 32, 19, 0) _DELAY (movingShipDelay
* 0.7) CALL DrawEspializer7
("W", 32, 19, 1) CALL DrawEspializer7
("W", x
, 18, 0) _DELAY (movingshipdelsy
* 0.7) CALL DrawEspializer7
("W", x
, 18, 1) CALL DrawEspializer7
("W", x
, 17, 0) _DELAY (movingshipdelsy
* 0.7) CALL DrawEspializer7
("W", x
, 17, 1) CALL DrawEspializer7
("N", x
, 17, 0) _DELAY (movingshipdelsy
* 0.6) CALL DrawEspializer7
("N", x
, 17, 1) CALL DrawEspializer7
("E", 46, 18, 0) _DELAY (movingShipDelay
* 0.6) CALL DrawEspializer7
("E", 46, 18, 1) CALL DrawEspializer7
("E", 47, 19, 0) _DELAY (movingShipDelay
* 0.6) CALL DrawEspializer7
("W", 47, 19, 1) CALL DrawEspializer7
("E", 48, y
, 0) _DELAY (mocingshipdelay
* 0.5) CALL DrawEspializer7
("E", 48, y
, 1) CALL DrawEspializer7
("S", 47, 26, 0) _DELAY (movingShipDelay
* 0.5) CALL DrawEspializer7
("S", 47, 26, 1) CALL DrawEspializer7
("S", 46, 27, 0) _DELAY (movingShipDelay
* 0.5) CALL DrawEspializer7
("S", 46, 27, 1) CALL DrawEspializer7
("S", x
, 28, 0) _DELAY (movingShipDelay
* 0.4) CALL DrawEspializer7
("S", x
, 28, 1) CALL DrawEspializer7
("W", x
, 29, 0) _DELAY (movingShipDelay
* 0.4) CALL DrawEspializer7
("W", x
, 29, 1) CALL DrawEspializer7
("W", x
, 28, 0) _DELAY (movingShipDelay
* 0.4) CALL DrawEspializer7
("W", x
, 28, 1) CALL DrawEspializer7
("W", 38, 27, 0) _DELAY (movingShipDelay
* 0.37) CALL DrawEspializer7
("W", 38, 27, 1) CALL DrawEspializer7
("N", 37, y
, 0) _DELAY (movingShipDelay
* 0.37) CALL DrawEspializer7
("N", 37, y
, 0) CALL DrawEspializer7
("E", x
, 22, 0) _DELAY (movingShipDelay
* 0.37) CALL DrawEspializer7
("E", x
, 22, 0) 'spin
CALL DrawEspializer7
("S", x
, 22, 0) _DELAY (movingShipDelay
* 0.37) CALL DrawEspializer7
("S", x
, 22, 0) CALL DrawEspializer7
("W", x
, 22, 0) _DELAY (movingShipDelay
* 0.37) CALL DrawEspializer7
("W", x
, 22, 0) CALL DrawEspializer7
("N", x
, 22, 0) _DELAY (movingShipDelay
* 0.37) CALL DrawEspializer7
("N", x
, 22, 0) CALL DrawEspializer7
("E", x
, 22, 0) _DELAY (movingShipDelay
* 0.37) CALL DrawEspializer7
("E", x
, 22, 0)
drawAccretionDisc:
CALL HorizontalLine
(38, 43, 2, t$
) 'outer arc CALL HorizontalLine
(44, 47, 3, t$
) CALL HorizontalLine
(48, 49, 4, t$
) CALL HorizontalLine
(50, 51, 5, t$
) CALL HorizontalLine
(52, 53, 6, t$
) CALL VerticalLine
(11, 12, 58, t$
) CALL VerticalLine
(14, 15, 60, t$
) CALL VerticalLine
(16, 18, 61, t$
) CALL VerticalLine
(19, 22, 62, t$
) CALL VerticalLine
(23, 27, 63, t$
) CALL VerticalLine
(28, 31, 62, t$
) CALL VerticalLine
(32, 34, 61, t$
) CALL VerticalLine
(35, 36, 60, t$
) CALL VerticalLine
(38, 39, 58, t$
) CALL HorizontalLine
(53, 54, 43, t$
) CALL HorizontalLine
(51, 52, 44, t$
) CALL HorizontalLine
(49, 50, 45, t$
) CALL HorizontalLine
(46, 48, 46, t$
) CALL HorizontalLine
(39, 45, 47, t$
) CALL HorizontalLine
(36, 43, 43, t$
) ' left side outer arc CALL HorizontalLine
(33, 35, 42, t$
) CALL HorizontalLine
(31, 32, 41, t$
) CALL HorizontalLine
(29, 30, 40, t$
) CALL VerticalLine
(36, 37, 26, t$
) CALL VerticalLine
(33, 34, 24, t$
) CALL VerticalLine
(30, 32, 23, t$
) CALL VerticalLine
(20, 29, 22, t$
) CALL VerticalLine
(18, 19, 23, t$
) CALL VerticalLine
(16, 17, 24, t$
) CALL VerticalLine
(14, 15, 25, t$
) CALL HorizontalLine
(28, 29, 11, t$
) CALL HorizontalLine
(31, 32, 9, t$
) CALL HorizontalLine
(33, 35, 8, t$
) CALL HorizontalLine
(36, 44, 7, t$
) CALL HorizontalLine
(35, 36, 14, t$
) 'right side inner arc CALL HorizontalLine
(37, 43, 13, t$
) CALL HorizontalLine
(44, 46, 14, t$
) CALL VerticalLine
(18, 19, 50, t$
) CALL VerticalLine
(20, 22, 51, t$
) CALL VerticalLine
(23, 28, 52, t$
) CALL VerticalLine
(29, 30, 51, t$
) CALL VerticalLine
(31, 32, 50, t$
) CALL HorizontalLine
(46, 47, 35, t$
) CALL HorizontalLine
(43, 45, 36, t$
) CALL HorizontalLine
(39, 42, 37, t$
) CALL HorizontalLine
(38, 42, 31, t$
) ' smallest arc CALL HorizontalLine
(36, 37, 30, t$
) CALL VerticalLine
(28, 29, 35, t$
) CALL VerticalLine
(23, 27, 34, t$
) CALL VerticalLine
(21, 22, 35, t$
) CALL HorizontalLine
(37, 42, 19, t$
)
endBlackHole:
LOCATE Espializer7.y
, Espializer7.x
gameInProgress = 1
'Set shipLog
shipLog.ships = 3
shipLog.morale = 0
shipLog.score = 0
shipLog.currentDamage.ship = 0
shipLog.currentDamage.medical = 0
shipLog.totalDamage.ship = 0
shipLog.totalDamage.medical = 0
shipLog.currentSurvivors = 0
shipLog.totalSurvivorsSaved = 0
shipLog.enemiesDestroyed = 0
shipLog.currentMedSupply = 0
shipLog.totalMedSupply = 0
max = 40
min = 20
jump
= INT(RND * (max
- min
+ 1)) + min
fleetJumpsWhenThisReaches0 = jump
shipsInSarienFleet = 10
'Wifran colonies
redoColony:
randomX = RNX
randomY = RNY
IF grid
(randomX
, randomY
, 1) = 0 THEN grid(randomX, randomY, 1) = wifranColony.code
grid(randomX, randomY, 2) = wifranColony.clr
grid
(randomX
, randomY
, 3) = INT(RND * 9) + 1 'number of survivors allowed on planet (1 to 10) COLOR wifranColony.clr
, 0
'space stations
redoBottomase:
randomX = RNX
randomY = RNY
IF grid
(randomX
, randomY
, 1) = 0 AND grid
(randomX
, randomY
+ 1, 1) = 0 AND randomY
+ 1 <= 45 THEN grid(randomX, randomY, 1) = Top.code
grid(randomX, randomY + 1, 1) = Bottom.code
grid(randomX, randomY, 2) = Top.clr
grid(randomX, randomY + 1, 2) = Bottom.clr
grid(randomX, randomY, 3) = 1
grid(randomX, randomY + 1, 3) = 1 'not really needed. s are always there
'Planets not aligned with the Wifran empire that are also enemies of the Sariens
redoOtherPlanet:
randomX = RNX
randomY = RNY
IF grid
(randomX
, randomY
, 1) = 0 THEN grid(randomX, randomY, 1) = otherPlanet.code
grid(randomX, randomY, 2) = otherPlanet.clr
grid
(randomX
, randomY
, 3) = (INT(RND * 6) + 2) ' number of medkits offered (2 to 7)
'Informants
redoInformant:
randomX = RNX
randomY = RNY
IF grid
(randomX
, randomY
, 1) = 0 THEN grid(randomX, randomY, 1) = informant.code
grid(randomX, randomY, 2) = informant.clr
grid(randomX, randomY, 3) = cnt 'which informant is which
'Sarien Heavy Crusiers
redoCruiser:
randomX = RNX
randomY = RNY
IF grid
(randomX
, randomY
, 1) = 0 THEN grid(randomX, randomY, 1) = sarienShip.code
grid(randomX, randomY, 2) = sarienShip.clr
grid(randomX, randomY, 3) = 11
'Disabled Wifran ships
disabledShip:
randomX = RNX
randomY = RNY
IF grid
(randomX
, randomY
, 1) = 0 THEN grid(randomX, randomY, 1) = disabledShip.code
grid(randomX, randomY, 2) = disabledShip.clr
grid
(randomX
, randomY
, 3) = INT(RND * (9 - 2 + 1)) + 2 'number of survivors still on board
'Black holes
redoBlackHole:
randomX = RNX
randomY = RNY
IF grid
(randomX
, randomY
, 1) = 0 THEN grid(randomX, randomY, 1) = blackHole.code
grid(randomX, randomY, 2) = blackHole.clr
grid(randomX, randomY, 3) = 1
'Wormholes
redoWormHole:
randomX = RNX
randomY = RNY
IF grid
(randomX
, randomY
, 1) = 0 THEN ' wormHoles(cnt).x = randomX
' wormHoles(cnt).y = randomY
' wormHoles(cnt).f = cnt
grid(randomX, randomY, 1) = cnt + 64
grid(randomX, randomY, 1) = cnt + 54
grid(randomX, randomY, 2) = wormHole.clr
grid(randomX, randomY, 3) = cnt
'The Sarien Fleet
redoFleet:
randomX = RNX
randomY = RNY
IF grid
(randomX
, randomY
, 1) = 0 AND grid
(randomX
+ 1, randomY
, 1) = 0 AND grid
(randomX
, randomY
+ 1, 1) = 0 AND grid
(randomX
+ 1, randomY
+ 1, 1) = 0 THEN grid(randomX, randomY, 1) = sarienFleet.code
grid(randomX, randomY, 2) = sarienFleet.clr
newFlag = 10
sarienJumpOn = jump
grid(randomX, randomY, 3) = newFlag
grid(randomX + 1, randomY, 1) = sarienFleet.code
grid(randomX + 1, randomY, 2) = sarienFleet.clr
grid(randomX + 1, randomY, 3) = newFlag
grid(randomX, randomY + 1, 1) = sarienFleet.code
grid(randomX, randomY + 1, 2) = sarienFleet.clr
grid(randomX, randomY + 1, 3) = newFlag
grid(randomX + 1, randomY + 1, 1) = sarienFleet.code
grid(randomX + 1, randomY + 1, 2) = sarienFleet.clr
grid(randomX + 1, randomY + 1, 3) = newFlag
LOCATE randomY
+ 1, randomX
+ 1
'espializer 7
anotherX = 0
anotherY = 1
redoespializer7:
anotherX = anotherX + 1
IF grid
(anotherX
, anotherY
, 1) = 0 THEN Espializer7.x = anotherX
Espializer7.y = anotherY
Espializer7.f = 1
LOCATE Espializer7.y
, Espializer7.x
gameInProgress = 1
'SUB l
'END SUB
RNX = rtn
RNY = rtn
'Draw the ocean part of the planet
CALL HorizontalLine
(1, 32, 45, CHR$(219)) CALL HorizontalLine
(2, 32, 44, CHR$(219)) CALL HorizontalLine
(3, 33, 43, CHR$(219)) CALL HorizontalLine
(4, 33, 42, CHR$(219)) CALL HorizontalLine
(6, 34, 41, CHR$(219)) CALL HorizontalLine
(7, 34, 40, CHR$(219)) CALL HorizontalLine
(8, 35, 39, CHR$(219)) CALL HorizontalLine
(10, 36, 38, CHR$(219)) CALL HorizontalLine
(12, 37, 37, CHR$(219)) CALL HorizontalLine
(13, 39, 36, CHR$(219)) CALL HorizontalLine
(68, 69, 36, CHR$(219)) CALL HorizontalLine
(15, 41, 35, CHR$(219)) CALL HorizontalLine
(53, 69, 35, CHR$(219)) CALL HorizontalLine
(16, 45, 34, CHR$(219)) CALL HorizontalLine
(50, 68, 34, CHR$(219)) CALL HorizontalLine
(18, 67, 33, CHR$(219)) CALL HorizontalLine
(20, 65, 32, CHR$(219)) CALL HorizontalLine
(22, 64, 31, CHR$(219)) CALL HorizontalLine
(24, 62, 30, CHR$(219)) CALL HorizontalLine
(26, 60, 29, CHR$(219)) CALL HorizontalLine
(28, 58, 28, CHR$(219)) CALL HorizontalLine
(31, 56, 27, CHR$(219)) CALL HorizontalLine
(35, 53, 26, CHR$(219)) CALL HorizontalLine
(40, 50, 25, CHR$(219))
'Draw the forest part of the planet
CALL HorizontalLine
(33, 52, 45, CHR$(219)) CALL HorizontalLine
(33, 53, 44, CHR$(219)) CALL HorizontalLine
(34, 54, 43, CHR$(219)) CALL HorizontalLine
(34, 55, 42, CHR$(219)) CALL HorizontalLine
(35, 56, 41, CHR$(219)) CALL HorizontalLine
(35, 57, 40, CHR$(219)) CALL HorizontalLine
(36, 65, 39, CHR$(219)) CALL HorizontalLine
(37, 67, 38, CHR$(219)) CALL HorizontalLine
(38, 70, 37, CHR$(219)) CALL HorizontalLine
(40, 67, 36, CHR$(219)) CALL HorizontalLine
(42, 52, 35, CHR$(219)) CALL HorizontalLine
(46, 49, 34, CHR$(219))
'Draw the dirt/other colored land part of the planet
CALL HorizontalLine
(53, 80, 45, CHR$(219)) CALL HorizontalLine
(54, 79, 44, CHR$(219)) CALL HorizontalLine
(55, 78, 43, CHR$(219)) CALL HorizontalLine
(56, 77, 42, CHR$(219)) CALL HorizontalLine
(57, 76, 41, CHR$(219)) CALL HorizontalLine
(58, 75, 40, CHR$(219)) CALL HorizontalLine
(66, 74, 39, CHR$(219)) CALL HorizontalLine
(68, 73, 38, CHR$(219)) CALL HorizontalLine
(71, 72, 37, CHR$(219))
'Draw the Espializer7 in the upper right portion of the screen
CALL DrawEspializer7
("W", 76, 9, 0)
'Display message
a$ = "The Espializer 7 has arrived at a planet"
b$ = "known for its medical expertise."
c$ = "Push [spacebar] to move into orbit"
PRINT " to move into orbit." CALL WaitForCharacter
(" ") 'Move Espializer7
CALL DrawEspializer7
("W", x
, 9, 0) CALL DrawEspializer7
("W", x
, 9, 1)
'Rotate the Espializer7 90 degrees counter-clockwise
CALL DrawEspializer7
("S", 12, 5, 0) a$ = "Push -esc- to hail the people of this planet."
PRINT " to hail the people of this planet."
IF grid
(Espializer7.x
, Espializer7.y
, 3) > 0 THEN numMedKits = grid(Espializer7.x, Espializer7.y, 3)
ClearStatus
a$ = "The concerned people of this world have offered"
d$ = "you a box of # medical kits to"
b$ = "help you battle the evil Sariens."
IF shipLog.currentMedSupply
+ numMedKits
<= 15 THEN c$ = "Push [spacebar] to accept or n to decline."
shipLog.currentMedSupply = shipLog.currentMedSupply + numMedKits
shipLog.score = shipLog.score + (5 * numMedKits)
grid(Espializer7.x, Espializer7.y, 3) = -1
ClearStatus
IF y
<= 31 THEN 'Put the planet back CALL HorizontalLine
(8, 14, 40, CHR$(219)) CALL HorizontalLine
(8, 14, 39, CHR$(219)) CALL HorizontalLine
(10, 14, 38, CHR$(219)) CALL HorizontalLine
(12, 14, 37, CHR$(219)) CALL HorizontalLine
(13, 14, 36, CHR$(219)) CALL VerticalLine
(y
, y
+ 8, 8, CHR$(219)) CALL VerticalLine
(y
, y
+ 8, 9, CHR$(219)) CALL VerticalLine
(y
, y
+ 8, 10, CHR$(219)) CALL VerticalLine
(y
, y
+ 8, 11, CHR$(219)) CALL VerticalLine
(y
, y
+ 8, 12, CHR$(219)) CALL VerticalLine
(y
, y
+ 8, 13, CHR$(219)) CALL VerticalLine
(y
, y
+ 8, 14, CHR$(219)) CALL VerticalLine
(y
+ 2, y
+ 6, 10, CHR$(219)) CALL VerticalLine
(y
+ 2, y
+ 6, 12, CHR$(219)) CALL VerticalLine
(y
, y
+ 8, 8, CHR$(219)) CALL VerticalLine
(y
, y
+ 8, 9, CHR$(219)) CALL VerticalLine
(y
, y
+ 8, 10, CHR$(219)) CALL VerticalLine
(y
, y
+ 8, 11, CHR$(219)) CALL VerticalLine
(y
, y
+ 8, 12, CHR$(219)) CALL VerticalLine
(y
, y
+ 8, 13, CHR$(219)) CALL VerticalLine
(y
, y
+ 8, 14, CHR$(219)) a$
= "You already have " + LTRIM$(STR$(shipLog.currentMedSupply
)) + " medical kits aboard." b$ = "Because you cannot hold more than 15, you will have"
c$ = "to come back here when you have space for these."
a$ = "The people living on this planet regretfully"
b$ = "inform you that they cannot help you again"
anotherEndSub:
ClearStatus
LOCATE 23, GetCenter
("Push -x- to return to the galaxy grid.") PRINT "eturn to the galaxy grid." CALL WaitForCharacter
("r")