
	.SEGMENT "LAVOS"


	.FUNCT	CHECK-RESTORE:ANY:0:0
?PRG1:	PRINTI	"Do you want to restore a saved game? "
	INPUT	1
	EQUAL?	STACK,89,121 \TRUE
	CRLF	
	WINATTR	TEXT-WINDOW,11
	RESTORE	
	CRLF	
	PRINTI	"Restore failed."
	CRLF	
	JUMP	?PRG1


	.FUNCT	GO:ANY:0:0
?FCN:	ICALL1	CHECK-RESTORE
	GET	0,19 >XFWRD
	GET	0,18 >XVWRD
	GET	0,17 >XHWRD
	GETB	0,30 >INTERPRETER
	GET	0,0
	BTST	STACK,4 /?CND1
	SET	'H-BOLD,H-INVERSE
?CND1:	SET	'HERE,START-LOC
	GET	PARTY,1 >LEADER
	SET	'SUBGROUP-MODE,TRUE-VALUE
	ICALL1	TURN-OFF-CURSOR
	ICALL1	INIT-SCREEN
	ICALL1	NEXT-DAY
	ICALL1	INTRO
	SET	'SCENE-OBJECT,DEFAULT-SCENE
	ICALL2	SCENE,DEFAULT-SCENE
	ICALL	MODE,TRAVEL-MODE,TRUE-VALUE
	ICALL1	PRINT-CHARACTER-COMMANDS
	ICALL	NEW-DEFAULT,1,-1
	SET	'ACTION,BUSY-COMMAND
	GET	0,8
	BTST	STACK,1 \?CND3
	SET	'SCRIPTING-FLAG,TRUE-VALUE
?CND3:	ICALL	QUEUE,I-INIT-RANDOM-STUFF,0
	ICALL1	PARTY-INPUT
	JUMP	?FCN


	.FUNCT	ANONF-2:ANY:0:0
	CALL	QSET?,ESSENCES,TRIED
	ZERO?	STACK \FALSE
	ICALL1	INIT-SPELLS
	CALL1	INIT-RUNES
	RSTACK	


	.FUNCT	INIT-SPELLS:ANY:0:0,TPC,FP,F,NUM,OFF
	SET	'TPC,7
	PUTP	SALT,P?COLOR,TAG-WHITE-POWDER
	PUTP	TAG-WHITE-POWDER,P?ESSENCE,SALT
	FIRST?	TAG-POWDERS >FP /?PRG2
?PRG2:	ZERO?	FP /?REP3
	RANDOM	TPC >NUM
	FIRST?	ESSENCES >F /?BOGUS7
?BOGUS7:	SET	'OFF,1
?PRG8:	EQUAL?	OFF,NUM \?CCL12
	PUTP	FP,P?ESSENCE,F
	PUTP	F,P?COLOR,FP
	REMOVE	F
	DEC	'TPC
	NEXT?	FP >FP /?PRG2
	JUMP	?PRG2
?CCL12:	INC	'OFF
	NEXT?	F >F /?PRG8
	JUMP	?PRG8
?REP3:	MOVE	ESSENCE-EARTH,ESSENCES
	MOVE	ESSENCE-AIR,ESSENCES
	MOVE	TAG-WHITE-POWDER,TAG-POWDERS
	RTRUE	


	.FUNCT	I-RTRUE:ANY:0:0
	RTRUE	


	.FUNCT	INTRO:ANY:0:0,CHR,F
	INPUT	1,1,I-RTRUE >CHR
	CALL2	PICK-ONE,INTRO-PICS
	ICALL2	GRAPHIC,STACK
	ZERO?	FONT3-FLAG /?CND1
	CALL2	CHANGE-FONT,4 >F
?CND1:	CRLF	
	EQUAL?	H-BOLD,H-INVERSE /?CND3
	HLIGHT	H-BOLD
?CND3:	ICALL2	WCENTER,STR?22
	HLIGHT	H-NORMAL
	CRLF	
	ICALL2	WCENTER,STR?23
	CRLF	
	ICALL2	WCENTER,STR?24
	CRLF	
	CRLF	
	ICALL2	WCENTER,STR?25
	CALL1	APPLE2?
	ZERO?	STACK /?CCL7
	CRLF	
	JUMP	?CND5
?CCL7:	CRLF	
	CRLF	
?CND5:	CALL1	APPLE2?
	ZERO?	STACK /?CCL10
	ICALL2	WCENTER,STR?26
	CRLF	
	ICALL2	WCENTER,STR?27
	CRLF	
	CRLF	
	ICALL2	WCENTER,STR?28
	CRLF	
	ICALL2	WCENTER,STR?29
	JUMP	?CND8
?CCL10:	ICALL2	WCENTER,STR?30
	CRLF	
	CRLF	
	ICALL2	WCENTER,STR?31
?CND8:	CRLF	
	ICALL2	WCENTER,STR?32
	CRLF	
	CRLF	
	ICALL2	WCENTER,STR?33
	INPUT	1
	ZERO?	FONT3-FLAG /?CND11
	ICALL2	CHANGE-FONT,F
?CND11:	CLEAR	TEXT-WINDOW
	EQUAL?	CHR,48 /TRUE
	PRINTI	"It was a Golden Age, or so it now seems; and there are but a few who can recall those years, and fewer still who would not tremble to speak of what followed."
	CRLF	
	CRLF	
	PRINTI	"But we were younger then, and less wise. It seems strange now to think that we had never set foot outside our village when we were called upon to take part in a great adventure - that fateful Journey which changed our world forever...."
	CRLF	
	CRLF	
	ZERO?	FONT3-FLAG /?CND15
	CALL2	CHANGE-FONT,4 >F
?CND15:	ICALL2	WCENTER,STR?33
	INPUT	1
	ZERO?	FONT3-FLAG /?CND17
	ICALL2	CHANGE-FONT,F
?CND17:	CLEAR	TEXT-WINDOW
	RTRUE	

	.ENDSEG

	.ENDI
