.L908C
LD   A,(LE93C)
CP   &06
.L9091
RET  Z
INC  A
LD   (LE93C),A
DEC  A
ADD  A,A
ADD  A,A
ADD  A,A
ADD  A,A
LD   (missionStatus),A
RET
 
.L909F
LD   HL,missionStatus
INC  (HL)
CALL clearCargo
LD   HL,TsupernovaMission
CALL printAlert
CALL QyesNo
CP   "Y"
JR   Z,L90B8
LD   HL,TsupernovaRefused
JR   L90CD
 
.L90B8
CALL L63BA
LD   HL,LEB61
LD   DE,LEB5D
LD   BC,&0004
LDIR
LD   HL,missionStatus
INC  (HL)
LD   HL,TrefugeeMission
.L90CD
CALL printAlert
JP   pressAkey
 
.printAlert
PUSH HL                 ; save the message Pointer
CALL resetView
LD   IX,coloursAttention
CALL restart28
LD   HL,TmissionNo
RST  &20                ; print string(s) at given position
LD   A,(missionStatus)
RRA
RRA
RRA
RRA
AND  &0F
LD   C,A
XOR  A
SBC  HL,HL
RST  &18                ; Print mission Number
LD   HL,Tattention
RST  &20                ; print string(s) at given position
LD   HL,commander
RST  &08                ; print it
POP  HL                 ; get the actual message pointer back
RST  &20                ; print string(s) at given position
RET
 
.L90FB
LD   HL,TrescueMission
CALL printAlert
LD   HL,LEB5D
LD   (HL),&00
LD   DE,LEB5E
LD   BC,&0003
LDIR
LD   HL,Nfifty
LD   DE,LEB55
LD   BC,&0004
LDIR
XOR  A
LD   (missionStatus),A
JP   pressAkey
 
.L9120
LD   A,(missionStatus)
CP   &10
JR   NZ,L912E
CALL L1C5C
XOR  A
LD   (LE940),A
.L912E
LD   BC,(LF760)
CALL L5325
LD   (LEFA2),A
LD   HL,L9A4A
CALL printAlert
LD   BC,&0F0B
LD   HL,TconstrictorMission
LD   A,(missionStatus)
CP   &20
JR   NZ,L9151
LD   BC,&050B
LD   HL,TdoccumentMission
.L9151
PUSH HL
CALL csrBC
LD   A,(LEFA2)
CALL decodeName
LD   HL,decodeBuf
RST  &08                ; print it
POP  HL
RST  &20                ; print string(s) at given position
CALL QyesNo
SUB  &4E
JR   NZ,L916C
LD   (missionStatus),A
RET
 
.L916C
LD   HL,missionStatus
INC  (HL)
LD   A,(missionStatus)
CP   &21
JR   NZ,L917D
LD   A,&01
LD   (LF785),A
RET
 
.L917D
LD   HL,TconstrictorMission2
CALL printAlert
LD   A,(LEFA2)
CALL decodeName
LD   HL,decodeBuf
RST  &08                ; print it
JP   pressAkey
 
.L9190
LD   A,(flagFlight)
OR   A
RET  Z
LD   A,(currentSystem)
LD   HL,LEFA2
CP   (HL)
RET  NZ
LD   HL,TconstrictorMission3
CALL printAlert
LD   HL,missionStatus
INC  (HL)
JP   pressAkey
 
.L91AA
LD   A,(flagFlight)
OR   A
RET  Z
LD   A,(currentSystem)
LD   HL,LEFA2
CP   (HL)
RET  NZ
LD   HL,missionStatus
INC  (HL)
CALL L50AA
LD   HL,TconstrictorMission4
CALL printAlert
LD   A,(LEFA2)
CALL decodeName
LD   HL,decodeBuf
RST  &08                ; print it
LD   HL,LEFA3
DEC  (HL)
JR   NZ,L91D8
LD   HL,missionStatus
INC  (HL)
.L91D8
JP   pressAkey
 
.L91DB
LD   HL,TdoccumentMissionDone
CALL printAlert
LD   A,&02
LD   (LF77E),A
XOR  A
LD   (missionStatus),A
LD   (LF785),A
JP   pressAkey
 
.constrictorDead
LD   HL,TconstrictorMissionDone
CALL printAlert
LD   HL,(credits)
LD   A,(credits+2)
LD   DE,100000-65536
ADD  HL,DE
ADC  A,&01
LD   (credits),HL
LD   (credits+2),A
XOR  A
LD   (missionStatus),A
JP   pressAkey
 
.L920F
LD   HL,TthargoidDef
CALL printAlert
XOR  A
LD   (missionStatus),A
INC  A
LD   (jammerEquiped),A
JP   pressAkey
 
.L9220
LD   HL,TthargoidMission
CALL printAlert
LD   HL,missionStatus
INC  (HL)
JP   pressAkey
 
.pressAkey
LD   HL,TpressAnyKey
RST  &20                ; print string(s) at given position
CALL L3A3C
JP   clearLower
 
.clearCargo
LD   HL,cargoSpace
LD   (HL),&00
LD   DE,cargoSpace+1
LD   BC,&0047
LDIR
RET
 
.TmissionNo
DB   &0E
DB   &01
DC   "Mission No. "
DB   &FF

.Tattention
DB   &05
DB   &04
DC   "Attn: Commander "
DB   &FF

.coloursAttention
DB   &0E,&01,&0D,&01,&71
DB   &05,&04,&20,&01,&D1
DB   &FF

.TsupernovaMission
DB   &05
DB   &08
DC   "Our sun is going supernova!"
DB   &05
DB   &0A
DC   "You are advised to hyper-space"
DB   &05
DB   &0B
DC   "out of this system immediately!"
DB   &05
DB   &16
DC   "Will you help us"
DB   &FF
.TrescueMission
DB   &05
DB   &08
DC   "TASK COMPLETE - CONGRATULATIONS"
DB   &05
DB   &0A
DC   "Thanks for saving us. Please"
DB   &05
DB   &0B
DC   "accept some precious gems"
.TpressAnyKey
DB   &05
DB   &16
DC   "Press any key to continue."
DB   &FF
.TrefugeeMission
DB   &05
DB   &06
DC   "Thank you!"
DB   &05
DB   &08
DC   "I'm afraid that we've had to"
DB   &05
DB   &09
DC   "dump any cargo you had to get"
DB   &05
DB   &0A
DC   "all of us refugees in. If you"
DB   &05
DB   &0B
DC   "just drop us off at the nearest"
DB   &05
DB   &0C
DC   "system, that'll be fine"
DB   &FF
.TsupernovaRefused
DB   &05
DB   &09
DC   "We hope you die a horribly long"
DB   &05
DB   &0A
DC   "lingering death at the hands of"
DB   &05
DB   &0B
DC   "a slimey green lobstoid if"
DB   &05
DB   &0C
DC   "you're not blown to bits by our"
DB   &05
DB   &0D
DC   "sun!"
DB   &FF

.TconstrictorMission
DB   &05
DB   &08
DC   "A prototype of the new military"
DB   &05
DB   &09
DC   "ship, the CONSTRICTOR, has been"
DB   &05
DB   &0A
DC   "stolen from the navy research"
DB   &05
DB   &0B
DC   "centre at"
DB   &05
DB   &0D
DC   "Due to the capabilities of this"
DB   &05
DB   &0E
DC   "ship, it must be destroyed"
DB   &05
DB   &0F
DC   "before falling into enemy hands."
DB   &05
DB   &16
DC   "Accept mission"
DB   &FF
.TconstrictorMission2
DB   &05
DB   &0B
DC   "for mission briefing.."
DB   &05
DB   &0A
DC   "Report to the station at "
DB   &FF
.TconstrictorMission3
DB   &05
DB   &0A
DC   "Intelligence reports that the"
DB   &05
DB   &0B
DC   "Constrictor made a galactic jump"
DB   &05
DB   &0C
DC   "out of this system a while ago."
DB   &FF
.TconstrictorMission4
DB   &05
DB   &0A
DC   "Intelligence reports that after"
DB   &05
DB   &0B
DC   "causing havoc, the Constrictor"
DB   &05
DB   &0C
DC   "left this system, destination is"
DB   &05
DB   &0D
DC   "system of "
DB   &FF
.TconstrictorMissionDone
DB   &05
DB   &09
DC   "The Navy are forever in your"
DB   &05
DB   &0A
DC   "debt, oh mighty trader"
DB   &05
DB   &0C
DC   "Please accept a reward for your"
DB   &05
DB   &0D
DC   "trouble of 10,000 credits."
DB   &FF
.TdoccumentMission
DB   &05
DB   &07
DC   "The navy has managed to obtain"
DB   &05
DB   &08
DC   "blueprints of a Thargoid battle"
DB   &05
DB   &09
DC   "ship. These documents need to be"
DB   &05
DB   &0A
DC   "taken to the main naval base at"
DB   &05
DB   &0D
DC   "The enemy is unaware that we"
DB   &05
DB   &0E
DC   "have these documents, so the"
DB   &05
DB   &0F
DC   "journey should be without any"
DB   &05
DB   &10
DC   "unfriendly encounters."
DB   &05,&16
DC   "Accept mission"
DB   &FF
.TdoccumentMissionDone
DB   &05
DB   &08
DC   "We are (again) forever in your"
DB   &05
DB   &09
DC   "debt for bringing these very"
DB   &05
DB   &0A
DC   "important documents to us. As"
DB   &05
DB   &0B
DC   "a reward, we have fitted your"
DB   &05
DB   &0C
DC   "ship with naval energy unit."
DB   &05
DB   &0E
DC   "P.S. sorry about the security"
DB   &05
DB   &0F
DC   "leak to the Thargoids!"
DB   &FF
.TthargoidMission
DB   &05
DB   &08
DC   "Intellegence reports that a"
DB   &05
DB   &09
DC   "nearby system has been invaded"
DB   &05
DB   &0A
DC   "by Thargoid ships and that the"
DB   &05
DB   &0B
DC   "space station is under attack. We"
DB   &05
DB   &0C
DC   "suggest that you destroy the"
DB   &05
DB   &0D
DC   "space station and don't try to"
DB   &05
DB   &0E
DC   "dock."
DB   &FF

.TthargoidDef
DB   &05
DB   &08
DC   "Thanks for destroying the"
DB   &05
DB   &09
DC   "Thargoid base. A new device was"
DB   &05
DB   &0A
DC   "salvaged from a Thargoid ship"
DB   &05
DB   &0B
DC   "which we have fitted to your"
DB   &05
DB   &0C
DC   "Cobra. The device appears to jam"
DB   &05
DB   &0D
DC   "ECM broadcasts and is activated"
DB   &05
DB   &0E
DC   "by the L key."
DB   &FF


.Nfifty
DD   50
.L9A4A
DB   &FF

End