Source:Monster Consolidate

From Eamon Wiki
Jump to navigation Jump to search
This page is a verbatim reproduction of original source material and should not be edited except for maintenance.
Description

The Applesoft BASIC source code of the Eamon utility program Monster Consolidate (aka Monster Inventory).

Source

Eamon Utilities III

Date

c. 1985

Author

John Nelson

License

The use of this item is permitted on the grounds that it's free or in the public domain.

1  REM     EAMON MONSTER
2  REM      INVENTORY
3  REM         AND
4  REM     CONSOLIDATION
5  REM       PROGRAM
6  REM 
7  REM     BY JOHN NELSON
8  REM 
10  REM  THIS PROGRAM READS MONSTERS FROM ALL THE EAMON ADVENTURES AND PUTS THE MONSTERS ALL OUT TO A SINGLE FILE ON DRIVE 2.
15 D$ =  CHR$ (4): TEXT : DIM M%(12),ML$(12): GOSUB 16000
20  HOME : PRINT "MONSTER INVENTORY": PRINT : PRINT "SELECT ACTION:": PRINT "  1. INITIALIZE FILE": PRINT "  2. CREATE MONSTER MASTER": PRINT "  3. ADD TO MASTER": PRINT "  4. LIST MONSTERS": PRINT "  5. QUIT"
30  INPUT "INPUT YOUR CHOICE:";CH: ON CH GOTO 20000,90,90,2000,1000
90  HOME : PRINT "INSERT WORK DISKETTE IN DRIVE 2": PRINT "        AND PRESS ANY KEY": GET A$: PRINT 
95  PRINT D$"OPEN MONSTER.MASTER,L384,S6,D2": PRINT D$"READ MONSTER.MASTER,R0": INPUT NM: PRINT D$
100  REM  >>> MAIN ROUTINE
130  IF NM = 0 THEN NM = 1: GOTO 160
160  PRINT : PRINT "INSERT EAMON ADVENTURE IN DRIVE 1": PRINT "        AND ENTER ADVENTURE #": INPUT "ADVENTURE #:";AN: PRINT 
165  IF AN < 4 OR AN = 13 THEN  PRINT : PRINT "USE VERSION 0 OF THIS PROGRAM!!": PRINT "THIS PROGRAM USES IMPROPER FORMAT.": GOTO 160
168  IF AN > 99 THEN  GOTO 20
170  PRINT D$"OPEN EAMON.MONSTERS,L128,S6,D1": PRINT D$"OPEN EAMON.DESC,L256,S6,D1": PRINT D$"READ EAMON.DESC,R0": INPUT X,X,X,NE
200  FOR M = 1 TO NE: PRINT D$"READ EAMON.MONSTERS,R";M: INPUT MN$: FOR A = 1 TO 12: INPUT M%(A): NEXT : PRINT D$"READ EAMON.DESC,R";M + 300: INPUT MD$: PRINT D$
210  PRINT NM;". ";MN$: INPUT "WANT THIS ONE?";YN$: IF YN$ = "N" THEN 240
220  PRINT D$"WRITE MONSTER.MASTER,R";NM: PRINT MN$: PRINT  CHR$ (34);MD$; CHR$ (34): FOR X = 1 TO 12: PRINT M%(X): NEXT 
240  PRINT D$:NM = NM + 1: NEXT M
270  GOTO 100
1000  REM  >>> END OF JOB
1010  PRINT D$"WRITE MONSTER.MASTER,R0": PRINT NM: PRINT D$"CLOSE": END 
2000  REM  >>> LIST MONSTERS
2010  PRINT D$"OPEN MONSTER.MASTER,L384,S6,D2": PRINT D$"READ MONSTER.MASTER,R0": INPUT NM
2020  HOME 
2030  FOR M = 1 TO NM: PRINT D$"READ MONSTER.MASTER,R";M: INPUT MN$: INPUT MD$: FOR X = 1 TO 12: INPUT M%(X): NEXT 
2040  HOME : PRINT "MONSTER #";M: PRINT : PRINT MN$: PRINT : PRINT MD$: FOR X = 1 TO 12: PRINT ML$(X);": ";M%(X): NEXT 
2050  PRINT D$: PRINT : PRINT "PRESS ANY KEY TO CONTINUE";: GET A$: PRINT : NEXT 
16000  REM  >>> LOAD TABLE
16010  FOR X = 1 TO 12: READ ML$(X): NEXT 
16020  DATA    HD      ,AG      ,FRIEND  ,COUR    ,ROOM    ,WEIGHT  ,DEF.ODDS,ARMOUR  ,WEAPON# ,OFF.ODDS,W.DICE  ,W.SIDES  
16090  RETURN 
20000  REM  >>> INIT MONSTER MASTER
20005 D$ =  CHR$ (4)
20010  PRINT D$"OPEN MONSTER.MASTER,L384,S6,D2": PRINT D$"WRITE MONSTER.MASTER,R0": PRINT 0: PRINT D$"CLOSE"
20020  END 
32000 D$ =  CHR$ (4): PRINT D$"OPEN MONSTER.MASTER,L384": PRINT D$"WRITE MONSTER.MASTER,R0": PRINT 175: PRINT D$"CLOSE"