alphaman-src/ITEMS.BAS.txt
Jamie Bainbridge 01f7ee57e9 Initial commit
2021-04-04 15:15:18 +10:00

577 lines
21 KiB
Plaintext

' Copyright (c) 1995 Jeffrey R. Olson
'
' Permission is hereby granted, free of charge, to any person obtaining a copy
' of this software and associated documentation files (the "Software"), to deal
' in the Software without restriction, including without limitation the rights
' to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
' copies of the Software, and to permit persons to whom the Software is
' furnished to do so, subject to the following conditions:
'
' The above copyright notice and this permission notice shall be included in all
' copies or substantial portions of the Software.
'
' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
' IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
' FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
' AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
' LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
' OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
' SOFTWARE.
DECLARE FUNCTION kolr$ (i%)
DECLARE SUB addlsd (k%)
DECLARE FUNCTION berryeff$ (num%)
DECLARE FUNCTION creatnam$ (typ%)
DECLARE SUB addssd (k%)
DECLARE FUNCTION jnk$ (num%, strt%, leng%)
DECLARE SUB init ()
DECLARE FUNCTION ssdnm$ (i%)
DECLARE FUNCTION lsdnm$ (i%)
DECLARE SUB addspecial (i%)
DECLARE SUB addberry (i%)
DECLARE SUB changeitems ()
DECLARE SUB loadit ()
DECLARE SUB saveit ()
DEFINT A-Z
' $INCLUDE: 'alpha.dec'
DIM SHARED sss(50, 20, 2), filin$
RANDOMIZE TIMER
COLOR 10, 1: CLS : LOCATE 3, 10: INPUT "Enter filename (.alf assumed) :", filin$
filin$ = filin$ + ".alf"
init
loadit
changeitems
saveit
CLS
END
SUB addberry (i)
IF ngoody >= 20 THEN EXIT SUB ELSE ngoody = ngoody + 1
goody(ngoody, 1) = 6 'type (berry)
goody(ngoody, 2) = 1 'fatigue
goody(ngoody, 3) = i 'type
goody(ngoody, 4) = INT(RND * 6) + 1 'color
goody(ngoody, 5) = 0 'berry
goody(ngoody, 6) = INT(RND * 3) 'age
goody(ngoody, 7) = 0
goody(ngoody, 8) = 0
goody(ngoody, 9) = 0
goody(ngoody, 10) = 0
goody(ngoody, 11) = 0
gdy(ngoody) = kolr$(goody(ngoody, 4)) + berry$(i) + bl + jnk$(-2, 37, 5)
knownb(i) = true
LOCATE 23, 1: FOR j = 1 TO 11: PRINT goody(ngoody, j); : NEXT j
END SUB
SUB addlsd (k)
IF ngoody >= 20 THEN EXIT SUB ELSE ngoody = ngoody + 1
IF k = 8 THEN 'safe
bad = false
FOR i = 1 TO ngoody
IF (ABS(goody(i, 1)) = 8) AND (goody(i, 11) = 8) THEN bad = true
NEXT
IF bad THEN k = nlsd + INT(RND * nltrash + 1) 'trash
END IF
FOR j = 1 TO 12: goody(ngoody, j) = 0: NEXT
goody(ngoody, 1) = 8
FOR j = 1 TO 3: goody(ngoody, j + 1) = lsd(k, j): NEXT j
LOCATE 22, 1: FOR j = 1 TO 11: PRINT goody(ngoody, j); : NEXT j
num = goody(ngoody, 3)
IF num > 0 THEN goody(ngoody, 3) = num - INT(RND * RND * num) ELSE goody(ngoody, 3) = -1
lsdknown(k) = true: goody(ngoody, 10) = true
goody(ngoody, 11) = k: gdy(ngoody) = lsdnm$(k)
IF (goody(ngoody, 1) = 8) AND (goody(ngoody, 11) = 8) AND (nsafe > 0) THEN goody(ngoody, 1) = -8
LOCATE 23, 1: FOR j = 1 TO 11: PRINT goody(ngoody, j); : NEXT j
END SUB
SUB addspecial (i)
IF ngoody >= 20 THEN EXIT SUB ELSE ngoody = ngoody + 1
goody(ngoody, 1) = 9 'type (special)
goody(ngoody, 2) = 1 'fatigue
goody(ngoody, 3) = i 'type
SELECT CASE i
CASE 1: gdy(ngoody) = "Skipper's Hat"
CASE 2: gdy(ngoody) = "Keptibora Serum"
CASE 3: gdy(ngoody) = "Map"
CASE 4: gdy(ngoody) = "Pair of Blue Suede Shoes"
CASE 5: gdy(ngoody) = "Space Suit"
CASE 6: gdy(ngoody) = "Can of Roast Beast"
CASE 7: gdy(ngoody) = "Bamboo Raft"
CASE 8: gdy(ngoody) = "Mets Hat"
CASE 9: gdy(ngoody) = "Ivana Wig"
END SELECT
END SUB
SUB addssd (kk)
k = ABS(kk)
IF ngoody >= 20 THEN EXIT SUB ELSE ngoody = ngoody + 1
IF k = 2 THEN 'backpack
bad = false
FOR i = 1 TO ngoody
IF (ABS(goody(i, 1)) = 7) AND (goody(i, 11) = 2) THEN bad = true
NEXT
FOR i = 1 TO nsafe
IF safe(i, 1) = 7 AND safe(i, 11) = 2 THEN bad = true
NEXT
IF bad THEN k = nssd + ntechwep + INT(RND * nstrash + 1) 'trash
END IF
FOR j = 1 TO 12: goody(ngoody, j) = 0: NEXT
goody(ngoody, 1) = 7
FOR i = 1 TO 8: goody(ngoody, i + 1) = ssd(k, i): NEXT i
num = goody(ngoody, 3)
IF num > 0 THEN goody(ngoody, 3) = num - INT(RND * RND * num) ELSE goody(ngoody, 3) = -1
ssdknown(k) = true: goody(ngoody, 10) = true
goody(ngoody, 11) = k
gdy(ngoody) = ssdnm$(k)
SELECT CASE k
CASE 19 'ID
goody(ngoody, 5) = INT(RND * 3 + 1)
IF kk < 0 THEN goody(ngoody, 5) = 4
CASE nssd + ntechwep + 13 'voodoo
typ = INT(RND * ncreat + creextra + 1): goody(ngoody, 5) = typ
IF ssdknown(k) THEN gdy(ngoody) = creatnam$(typ) + bl + gdy(ngoody)
IF LEFT$(UCASE$(gdy(ngoody)), 3) = "THE" THEN
gdy(ngoody) = RIGHT$(gdy(ngoody), LEN(gdy(ngoody)) - 4)
END IF
CASE ELSE
END SELECT
IF (goody(ngoody, 1) = 7) AND (goody(ngoody, 11) = 2) AND (npack > 0) THEN goody(ngoody, 1) = -7
LOCATE 24, 1: FOR j = 1 TO 11: PRINT goody(ngoody, j); : NEXT j
END SUB
FUNCTION berryeff$ (num)
SELECT CASE num
CASE 0: a$ = "turn you green"
CASE 1: a$ = "exploding"
CASE 2: a$ = "radiation"
CASE 3: a$ = "satisfy hunger"
CASE 4: a$ = "refresh"
CASE 5: a$ = "poison"
CASE 6: a$ = "cure light"
CASE 7: a$ = "cure critical"
CASE 8: a$ = "change experience"
CASE 9: a$ = "change strength"
CASE 10: a$ = "change dexterity"
CASE 11: a$ = "change constitution"
CASE 12: a$ = "change rad. resistance"
CASE 13: a$ = "change ment. resistance"
CASE 14: a$ = "change intelligence"
CASE 15: a$ = "speed up/slow down"
CASE 16: a$ = "toughen skin"
CASE 17: a$ = "intoxicate"
CASE 18: a$ = "increased brain talent"
CASE 19: a$ = "grow body part"
CASE 20: a$ = "quench/heighten mut."
CASE 21: a$ = "enhanced detection"
CASE 22: a$ = "blind"
CASE 23: a$ = "burp-inducing"
CASE 24: a$ = "forgetfulness"
CASE 25: a$ = "frighten"
CASE 26: a$ = "detoxify"
CASE 27: a$ = "rambo"
CASE 28: a$ = "invisibility"
CASE 29: a$ = "teleport"
CASE 30: a$ = "sleep inducing"
CASE 31: a$ = "klutz inducing"
CASE 32: a$ = "regeneration"
CASE 33: a$ = "attraction odor"
CASE 34: a$ = "force field"
CASE 35: a$ = "acid"
END SELECT
berryeff$ = a$
END FUNCTION
SUB changeitems
COLOR 13, 1: CLS : LOCATE 10, 10
n3 = nberry \ 3 + 1: COLOR 12, 1: CLS
FOR i = 0 TO nberry
LOCATE (i MOD n3) + 1, 1 + 27 * (i \ n3)
PRINT RTRIM$(LTRIM$(STR$(i + 1))); ".";
PRINT berryeff$(i)
NEXT
addber: IF ngoody = 20 THEN EXIT SUB
LOCATE 21, 1: PRINT USING "You may add ## new items, maximum"; 20 - ngoody
LOCATE 20, 1: PRINT SPACE$(79); : LOCATE 20, 1
INPUT ; "Add which berry (press Enter to add none): ", num
IF num >= 1 AND num <= nberry + 1 THEN
addberry num - 1: IF ngoody < 20 GOTO addber
END IF
n3 = (nssd + ntechwep + nstrash) \ 4 + 1: COLOR 14, 1: CLS
FOR i = 1 TO nssd + ntechwep + nstrash
LOCATE ((i - 1) MOD n3) + 1, 1 + 20 * ((i - 1) \ n3)
PRINT RTRIM$(LTRIM$(STR$(i))); ".";
PRINT LEFT$(ssdnm$(i), 15);
NEXT
addssd: IF ngoody = 20 THEN EXIT SUB
LOCATE 25, 1: PRINT SPACE$(78); : LOCATE 25, 1
INPUT ; "Add which small device? (press Enter to add none): ", num
IF num >= 1 AND num <= nssd + ntechwep + nstrash THEN
addssd num: IF ngoody < 20 GOTO addssd
END IF
n3 = (nlsd + nltrash) \ 3 + 1: COLOR 11, 1: CLS
FOR i = 1 TO nlsd + nltrash
LOCATE ((i - 1) MOD n3) + 1, 1 + 27 * ((i - 1) \ n3)
PRINT RTRIM$(LTRIM$(STR$(i))); ".";
PRINT lsdnm$(i)
NEXT
addlsd: IF ngoody = 20 THEN EXIT SUB
LOCATE 22, 1: PRINT SPACE$(78); : LOCATE 22, 1
INPUT ; "Add which large device? (press Enter to add none): ", num
IF num > 0 AND num <= nlsd + nltrash THEN
addlsd num: IF ngoody < 20 GOTO addlsd
END IF
COLOR 15, 1: CLS
LOCATE 10, 10: INPUT "Add items to prepare to win game? ", yn$
IF UCASE$(LEFT$(yn$, 1)) = "Y" THEN
FOR i = 2 TO 6: addspecial i: NEXT i
addssd -19
END IF
END SUB
FUNCTION creatnam$ (typ)
IF typ < 1 THEN typ = 1
IF typ = wimp AND wimpname$ <> "" THEN
d$ = wimpname$
ELSE
OPEN "alphaman.2" FOR RANDOM AS #3 LEN = 50
FIELD #3, 20 AS nm$, 30 AS dud$
GET #3, typ: c$ = RTRIM$(LTRIM$(nm$)): d$ = SPACE$(20): CLOSE #3
k = 1: stopit = false
DO
aa = ASC(MID$(c$, k, 1))
IF aa = 242 THEN
stopit = true
ELSE
aa = aa XOR k * 6: MID$(d$, k, 1) = CHR$(aa MOD 256)
END IF
k = k + 1
LOOP UNTIL stopit OR (k = 21)
END IF
creatnam$ = RTRIM$(LTRIM$(d$))
END FUNCTION
SUB init
CLOSE #2: OPEN "alphaman.3" FOR BINARY AS #2
nstuff = nwep + nrwep + nsh + narm
nstuff = nstuff + nssd + ntechwep + nstrash + nlsd + nltrash
GET #2, 6 * nstuff - 1, i
FOR i = 1 TO 10: FOR j = 1 TO 3: GET #2, , symb(i, j): NEXT j, i
FOR i = 1 TO nwep + nrwep: FOR j = 1 TO 6: GET #2, , wep(i, j): NEXT j, i
FOR i = 1 TO nsh: GET #2, , sh(i, 1): GET #2, , sh(i, 2): NEXT i
FOR i = 1 TO narm: GET #2, , arm(i, 1): GET #2, , arm(i, 2): NEXT i
FOR i = 1 TO nssd
GET #2, , ssdtyp(i): FOR j = 1 TO 3: GET #2, , ssd(i, j): NEXT j
GET #2, , ssd(i, 9)
NEXT i
FOR i = nssd + 1 TO nssd + ntechwep
GET #2, , ssdtyp(i): FOR j = 1 TO 9: GET #2, , ssd(i, j): NEXT j
NEXT i
FOR i = nssd + ntechwep + 1 TO nssd + ntechwep + nstrash
GET #2, , ssdtyp(i): FOR j = 1 TO 3: GET #2, , ssd(i, j): NEXT j
GET #2, , ssd(i, 9)
NEXT i
FOR i = 1 TO nlsd + nltrash
GET #2, , lsdtyp(i): FOR j = 1 TO 4: GET #2, , lsd(i, j): NEXT j
NEXT i
END SUB
FUNCTION jnk$ (num, strt, leng)
IF num < -2 THEN num = -2 ELSE IF num > 420 THEN num = 420
num = num + 2
bbbb$ = SPACE$(68)
OPEN "alphaman.1" FOR BINARY AS #3: GET #3, num * 68 + 1, bbbb$: CLOSE #3
IF leng > 69 - strt THEN leng = 69 - strt
junk$ = MID$(bbbb$, strt, leng)
num = num - 2
FOR i = 1 TO leng
MID$(junk$, i, 1) = CHR$(ASC(MID$(junk$, i, 1)) XOR (ABS(17 * num + 31 * (i + strt - 1)) MOD 256))
NEXT i
jnk$ = junk$
END FUNCTION
FUNCTION kolr$ (i)
SELECT CASE i
CASE 1: b = 1: c = 4
CASE 2: b = 5: c = 7
CASE 3: b = 12: c = 7
CASE 4: b = 19: c = 6
CASE 5: b = 25: c = 5
CASE ELSE: b = 30: c = 7
END SELECT
kolr$ = jnk$(-2, b, c)
END FUNCTION
SUB loadit '=======================================================
CLOSE #1
OPEN filin$ FOR APPEND AS #1: CLOSE #1
OPEN filin$ FOR INPUT AS #1
IF EOF(1) THEN 'doesn't exist
CLOSE #1: KILL filin$: PRINT "Doesn't exist"
END
END IF
CLOSE #1
OPEN filin$ FOR BINARY AS #1
GET #1, , vdate&
IF vdate& <> versiondate THEN
LOCATE 14, 20: PRINT "Incorrect version"; : END
END IF
GET #1, , lll: name$ = SPACE$(lll): GET #1, , name$
PRINT ".";
GET #1, , ngoody: GET #1, , npack: GET #1, , ndropped: GET #1, , nsafe
FOR i = 1 TO ngoody
GET #1, , lll: gdy(i) = SPACE$(lll): GET #1, , gdy(i)
NEXT i
PRINT ".";
FOR i = 1 TO npack
GET #1, , lll: bakpak(i) = SPACE$(lll): GET #1, , bakpak(i)
NEXT i
FOR i = 1 TO ndropped
GET #1, , lll: drgdy(i) = SPACE$(lll): GET #1, , drgdy(i)
NEXT i
FOR i = 1 TO nsafe
GET #1, , lll: saf(i) = SPACE$(lll): GET #1, , saf(i)
NEXT i
FOR i = 0 TO 40: berry$(i) = SPACE$(6): GET #1, , berry$(i): NEXT i
FOR i = 1 TO ngoody
FOR j = 1 TO 12: GET #1, , goody(i, j): NEXT j
NEXT i
FOR i = 1 TO npack
FOR j = 1 TO 12: GET #1, , backpack(i, j): NEXT j
NEXT i
FOR i = 1 TO ndropped
FOR j = 1 TO 16: GET #1, , drgoody(i, j): NEXT j
NEXT i
FOR i = 1 TO nsafe
FOR j = 1 TO 12: GET #1, , safe(i, j): NEXT j
NEXT i
PRINT ".";
GET #1, , nnear
FOR i = 1 TO nnear
FOR j = 1 TO 15: GET #1, , ncre(i, j): NEXT j
NEXT i
FOR i = 0 TO 40: GET #1, , berord(i): GET #1, , knownb(i): NEXT i
PRINT ".";
FOR i = 2 TO 51: FOR j = 2 TO 21: GET #1, , goodythere(i, j): NEXT j, i
PRINT ".";
FOR i = 0 TO 6: FOR j = -10 TO 10: GET #1, , goodycastle(i, j): NEXT j, i
FOR i = 1 TO 20: FOR j = 1 TO 3: GET #1, , localgoody(i, j): NEXT j, i
FOR i = 1 TO 10: FOR j = 1 TO 3: GET #1, , radzone(i, j): NEXT j, i
FOR i = 1 TO 80: GET #1, , ssdknown(i): NEXT i
FOR i = 1 TO 40: GET #1, , lsdknown(i): NEXT i
FOR i = -10 TO 10: GET #1, , xstairs(i): NEXT i
FOR i = -10 TO 10: GET #1, , ystairs(i): NEXT i
FOR i = 1 TO 10: FOR j = 1 TO 3: GET #1, , monozone(i, j): NEXT j, i
PRINT ".";
GET #1, , str: GET #1, , stradd: GET #1, , dex: GET #1, , dexadd
GET #1, , con: GET #1, , rr: GET #1, , mr: GET #1, , intl
GET #1, , hitmax: GET #1, , hits: GET #1, , hunger: GET #1, , fatigue!
GET #1, , expr&: GET #1, , lvl: GET #1, , pmut: GET #1, , mmut
GET #1, , radsuit: GET #1, , heatsuit: GET #1, , reflecsuit
GET #1, , flashlight: GET #1, , gasmask: GET #1, , sunglasses
GET #1, , wetsuit: GET #1, , mask: GET #1, , boots
GET #1, , pmutturns: GET #1, , mmutturns: GET #1, , inwater
GET #1, , waterturns: GET #1, , inpit: GET #1, , zippy
GET #1, , wpturns: GET #1, , seed!: GET #1, , vpage
GET #1, , mainx: GET #1, , mainy: GET #1, , localx
GET #1, , localy: GET #1, , terrain: GET #1, , terrf
GET #1, , terrb: GET #1, , currsym: GET #1, , currf
GET #1, , currb: GET #1, , ncastle: GET #1, , nruins
GET #1, , castle: GET #1, , castlelevel: GET #1, , incastle
GET #1, , dum
GET #1, , lwall: GET #1, , rwall: GET #1, , twall: GET #1, , bwall
GET #1, , lwscr: GET #1, , rwscr: GET #1, , twscr
GET #1, , bwscr: GET #1, , dots: GET #1, , xenter
GET #1, , yenter: GET #1, , xenterscr: GET #1, , yenterscr
GET #1, , enterdir: GET #1, , bitit: GET #1, , berstr
PRINT ".";
GET #1, , berdex: GET #1, , bercon: GET #1, , berrr
GET #1, , bermr: GET #1, , berintl
GET #1, , berac: GET #1, , berpmut: GET #1, , bermmut
GET #1, , berconfuse: GET #1, , berdet: GET #1, , berblind
GET #1, , berhic: GET #1, , brandy: GET #1, , berscare
GET #1, , strtox: GET #1, , dextox: GET #1, , contox
GET #1, , berrambo: GET #1, , weather: GET #1, , wind
GET #1, , gt!: GET #1, , rside: GET #1, , roachdef
GET #1, , radint: GET #1, , armor: GET #1, , shield
GET #1, , dark: GET #1, , grabbed: GET #1, , vehicle: GET #1, , confu
GET #1, , hittox: GET #1, , asleep: GET #1, , sunscreen
GET #1, , invisible: GET #1, , udder: GET #1, , flare
GET #1, , coffee: GET #1, , tapenum: GET #1, , berfresh
GET #1, , elvislevel: GET #1, , grinchlevel: GET #1, , grinchzone
GET #1, , serum!: GET #1, , map: GET #1, , bsshoes
GET #1, , spacesuit: GET #1, , bergreen: GET #1, , berklutz
GET #1, , klutzdex: GET #1, , berregen: GET #1, , beryum
GET #1, , camosuit: GET #1, , pinsuit: GET #1, , notoxin
GET #1, , other2hitc: GET #1, , other2hitr: GET #1, , otherdam
GET #1, , tapeworm: GET #1, , turbo!: GET #1, , bulletsuit
GET #1, , xmono: GET #1, , ymono: GET #1, , mononum
GET #1, , inweb: GET #1, , ffgen: GET #1, , inglue
GET #1, , inbog: GET #1, , insand: GET #1, , hail
GET #1, , tent: GET #1, , berff: GET #1, , berhpmut: GET #1, , berhmmut
GET #1, , tentgrab: GET #1, , metshat: GET #1, , grinchstole
GET #1, , mindweb: GET #1, , repulse: GET #1, , ripehrs
GET #1, , spore: GET #1, , answer: GET #1, , skinac
GET #1, , starting: GET #1, , difficulty: GET #1, , finishedcastles
GET #1, , uvhelmet: GET #1, , neutronsuit
FOR i = 1 TO 4: GET #1, , dum: NEXT
PRINT ".";
n$ = bl
GET #1, , l: ber$ = SPACE$(l): FOR j = 1 TO l: GET #1, , n$: MID$(ber$, j, 1) = n$: NEXT j
FOR i = 2 TO 51: FOR j = 2 TO 21
GET #1, , sss(i - 1, j - 1, 1)
NEXT j, i
FOR i = 2 TO 51: FOR j = 2 TO 21
GET #1, , sss(i - 1, j - 1, 2)
NEXT j, i
CLOSE #1
END SUB
FUNCTION lsdnm$ (i)
place = 6 * (nwep + nrwep + nsh + narm + nssd + ntechwep + nstrash + i) - 5
GET #2, place, a: GET #2, , b: GET #2, , c
lsdnm$ = jnk$(a, b, c)
END FUNCTION
SUB saveit '==============================================================
CLOSE #1
OPEN filin$ FOR BINARY AS #1
vdate& = versiondate: PUT #1, , vdate&
lll = LEN(name$): PUT #1, , lll: PUT #1, , name$
PUT #1, , ngoody: PUT #1, , npack: PUT #1, , ndropped: PUT #1, , nsafe
FOR i = 1 TO ngoody
lll = LEN(gdy(i)): PUT #1, , lll: PUT #1, , gdy(i)
NEXT i
FOR i = 1 TO npack
lll = LEN(bakpak(i)): PUT #1, , lll: PUT #1, , bakpak(i)
NEXT i
FOR i = 1 TO ndropped
lll = LEN(drgdy(i)): PUT #1, , lll: PUT #1, , drgdy(i)
NEXT i
FOR i = 1 TO nsafe
lll = LEN(saf(i)): PUT #1, , lll: PUT #1, , saf(i)
NEXT i
FOR i = 0 TO nberry: PUT #1, , berry$(i): NEXT i
FOR i = 1 + nberry TO 40: PUT #1, , berry$(nberry): NEXT i
FOR i = 1 TO ngoody
IF goody(i, 1) = 9 AND goody(i, 3) = 9 THEN goody(i, 4) = 3
FOR j = 1 TO 12: PUT #1, , goody(i, j): NEXT j
NEXT i
FOR i = 1 TO npack
FOR j = 1 TO 12: PUT #1, , backpack(i, j): NEXT j
NEXT i
FOR i = 1 TO ndropped
FOR j = 1 TO 16: PUT #1, , drgoody(i, j): NEXT j
NEXT i
FOR i = 1 TO nsafe
FOR j = 1 TO 12: PUT #1, , safe(i, j): NEXT j
NEXT i
PUT #1, , nnear
FOR i = 1 TO nnear: FOR j = 1 TO 15: PUT #1, , ncre(i, j): NEXT j, i
FOR i = 0 TO 40: PUT #1, , berord(i): PUT #1, , knownb(i): NEXT i
FOR i = 2 TO 51: FOR j = 2 TO 21: PUT #1, , goodythere(i, j): NEXT j, i
FOR i = 0 TO 6: FOR j = -10 TO 10: PUT #1, , goodycastle(i, j): NEXT j, i
FOR i = 1 TO 20: FOR j = 1 TO 3: PUT #1, , localgoody(i, j): NEXT j, i
FOR i = 1 TO 10: FOR j = 1 TO 3: PUT #1, , radzone(i, j): NEXT j, i
FOR i = 1 TO 80: PUT #1, , ssdknown(i): NEXT i
FOR i = 1 TO 40: PUT #1, , lsdknown(i): NEXT i
FOR i = -10 TO 10: PUT #1, , xstairs(i): NEXT i
FOR i = -10 TO 10: PUT #1, , ystairs(i): NEXT i
FOR i = 1 TO 10: FOR j = 1 TO 3: PUT #1, , monozone(i, j): NEXT j, i
PUT #1, , str: PUT #1, , stradd: PUT #1, , dex: PUT #1, , dexadd
PUT #1, , con: PUT #1, , rr: PUT #1, , mr: PUT #1, , intl
PUT #1, , hitmax: PUT #1, , hits: PUT #1, , hunger: PUT #1, , fatigue!
PUT #1, , expr&: PUT #1, , lvl: PUT #1, , pmut: PUT #1, , mmut
PUT #1, , radsuit: PUT #1, , heatsuit: PUT #1, , reflecsuit
PUT #1, , flashlight: PUT #1, , gasmask: PUT #1, , sunglasses
PUT #1, , wetsuit: PUT #1, , mask: PUT #1, , boots
PUT #1, , pmutturns: PUT #1, , mmutturns: PUT #1, , inwater
PUT #1, , waterturns: PUT #1, , inpit: PUT #1, , zippy
PUT #1, , wpturns: PUT #1, , seed!: PUT #1, , vpage
PUT #1, , mainx: PUT #1, , mainy: PUT #1, , localx
PUT #1, , localy: PUT #1, , terrain: PUT #1, , terrf
PUT #1, , terrb: PUT #1, , currsym: PUT #1, , currf
PUT #1, , currb: PUT #1, , ncastle: PUT #1, , nruins
PUT #1, , castle: PUT #1, , castlelevel: PUT #1, , incastle
PUT #1, , dum
PUT #1, , lwall: PUT #1, , rwall: PUT #1, , twall: PUT #1, , bwall
PUT #1, , lwscr: PUT #1, , rwscr: PUT #1, , twscr
PUT #1, , bwscr: PUT #1, , dots: PUT #1, , xenter
PUT #1, , yenter: PUT #1, , xenterscr: PUT #1, , yenterscr
PUT #1, , enterdir: PUT #1, , bitit: PUT #1, , berstr
PUT #1, , berdex: PUT #1, , bercon: PUT #1, , berrr
PUT #1, , bermr: PUT #1, , berintl
PUT #1, , berac: PUT #1, , berpmut: PUT #1, , bermmut
PUT #1, , berconfuse: PUT #1, , berdet: PUT #1, , berblind
PUT #1, , berhic: PUT #1, , brandy: PUT #1, , berscare
PUT #1, , strtox: PUT #1, , dextox: PUT #1, , contox
PUT #1, , berrambo: PUT #1, , weather: PUT #1, , wind
PUT #1, , gt!: PUT #1, , rside: PUT #1, , roachdef
PUT #1, , radint: PUT #1, , armor: PUT #1, , shield
PUT #1, , dark: PUT #1, , grabbed: PUT #1, , vehicle: PUT #1, , confu
PUT #1, , hittox: PUT #1, , asleep: PUT #1, , sunscreen
PUT #1, , invisible: PUT #1, , udder: PUT #1, , flare
PUT #1, , coffee: PUT #1, , tapenum: PUT #1, , berfresh
PUT #1, , elvislevel: PUT #1, , grinchlevel: PUT #1, , grinchzone
PUT #1, , serum!: PUT #1, , map: PUT #1, , bsshoes
PUT #1, , spacesuit: PUT #1, , bergreen: PUT #1, , berklutz
PUT #1, , klutzdex: PUT #1, , berregen: PUT #1, , beryum
PUT #1, , camosuit: PUT #1, , pinsuit: PUT #1, , notoxin
PUT #1, , other2hitc: PUT #1, , other2hitr: PUT #1, , otherdam
PUT #1, , tapeworm: PUT #1, , turbo!: PUT #1, , bulletsuit
PUT #1, , xmono: PUT #1, , ymono: PUT #1, , mononum
PUT #1, , inweb: PUT #1, , ffgen: PUT #1, , inglue
PUT #1, , inbog: PUT #1, , insand: PUT #1, , hail
PUT #1, , tent: PUT #1, , berff: PUT #1, , berhpmut: PUT #1, , berhmmut
PUT #1, , tentgrab: PUT #1, , metshat: PUT #1, , grinchstole
PUT #1, , mindweb: PUT #1, , repulse: PUT #1, , ripehrs
PUT #1, , spore: PUT #1, , answer: PUT #1, , skinac
PUT #1, , starting: PUT #1, , difficulty: PUT #1, , finishedcastles
PUT #1, , uvhelmet: PUT #1, , neutronsuit
FOR i = 1 TO 4: PUT #1, , dum: NEXT
lll = LEN(ber$): PUT #1, , lll: PUT #1, , ber$
FOR i = 2 TO 51: FOR j = 2 TO 21
PUT #1, , sss(i - 1, j - 1, 1)
NEXT j, i
FOR i = 2 TO 51: FOR j = 2 TO 21
PUT #1, , sss(i - 1, j - 1, 2)
NEXT j, i
CLOSE #1
END SUB
FUNCTION ssdnm$ (i)
place = 6 * (nwep + nrwep + nsh + narm + i) - 5
GET #2, place, a: GET #2, , b: GET #2, , c
ssdnm$ = jnk$(a, b, c)
END FUNCTION