home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: SHell self-extracting ARchive
(archive/shar).
You can browse this item here: rnd
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 46 72 6f 6d 20 6d 69 70 | 6f 73 33 21 69 6e 74 65 |From mip|os3!inte|
|00000010| 6c 63 61 21 6f 6c 69 76 | 65 62 21 70 79 72 61 6d |lca!oliv|eb!pyram|
|00000020| 69 64 21 64 65 63 77 72 | 6c 21 68 70 6c 61 62 73 |id!decwr|l!hplabs|
|00000030| 21 75 63 62 76 61 78 21 | 64 65 63 76 61 78 21 74 |!ucbvax!|decvax!t|
|00000040| 65 6b 74 72 6f 6e 69 78 | 21 74 65 6b 67 65 6e 21 |ektronix|!tekgen!|
|00000050| 74 65 6b 72 65 64 21 67 | 61 6d 65 73 2d 72 65 71 |tekred!g|ames-req|
|00000060| 75 65 73 74 20 57 65 64 | 20 4a 75 6c 20 32 32 20 |uest Wed| Jul 22 |
|00000070| 30 38 3a 30 37 3a 30 30 | 20 50 44 54 20 31 39 38 |08:07:00| PDT 198|
|00000080| 37 0a 41 72 74 69 63 6c | 65 20 34 34 20 6f 66 20 |7.Articl|e 44 of |
|00000090| 63 6f 6d 70 2e 73 6f 75 | 72 63 65 73 2e 67 61 6d |comp.sou|rces.gam|
|000000a0| 65 73 3a 0a 50 61 74 68 | 3a 20 74 64 32 63 61 64 |es:.Path|: td2cad|
|000000b0| 21 6d 69 70 6f 73 33 21 | 69 6e 74 65 6c 63 61 21 |!mipos3!|intelca!|
|000000c0| 6f 6c 69 76 65 62 21 70 | 79 72 61 6d 69 64 21 64 |oliveb!p|yramid!d|
|000000d0| 65 63 77 72 6c 21 68 70 | 6c 61 62 73 21 75 63 62 |ecwrl!hp|labs!ucb|
|000000e0| 76 61 78 21 64 65 63 76 | 61 78 21 74 65 6b 74 72 |vax!decv|ax!tektr|
|000000f0| 6f 6e 69 78 21 74 65 6b | 67 65 6e 21 74 65 6b 72 |onix!tek|gen!tekr|
|00000100| 65 64 21 67 61 6d 65 73 | 2d 72 65 71 75 65 73 74 |ed!games|-request|
|00000110| 0a 46 72 6f 6d 3a 20 67 | 61 6d 65 73 2d 72 65 71 |.From: g|ames-req|
|00000120| 75 65 73 74 40 74 65 6b | 72 65 64 2e 54 45 4b 2e |uest@tek|red.TEK.|
|00000130| 43 4f 4d 0a 4e 65 77 73 | 67 72 6f 75 70 73 3a 20 |COM.News|groups: |
|00000140| 63 6f 6d 70 2e 73 6f 75 | 72 63 65 73 2e 67 61 6d |comp.sou|rces.gam|
|00000150| 65 73 0a 53 75 62 6a 65 | 63 74 3a 20 76 30 31 69 |es.Subje|ct: v01i|
|00000160| 30 39 37 3a 20 20 72 6e | 64 20 2d 20 72 61 6e 64 |097: rn|d - rand|
|00000170| 6f 6d 20 73 74 75 66 66 | 20 67 65 6e 65 72 61 74 |om stuff| generat|
|00000180| 6f 72 20 28 63 72 65 61 | 74 65 20 61 20 64 75 6e |or (crea|te a dun|
|00000190| 67 65 6f 6e 29 0a 4d 65 | 73 73 61 67 65 2d 49 44 |geon).Me|ssage-ID|
|000001a0| 3a 20 3c 31 34 31 32 40 | 74 65 6b 72 65 64 2e 54 |: <1412@|tekred.T|
|000001b0| 45 4b 2e 43 4f 4d 3e 0a | 44 61 74 65 3a 20 32 30 |EK.COM>.|Date: 20|
|000001c0| 20 4a 75 6c 20 38 37 20 | 32 31 3a 32 31 3a 35 31 | Jul 87 |21:21:51|
|000001d0| 20 47 4d 54 0a 53 65 6e | 64 65 72 3a 20 62 69 6c | GMT.Sen|der: bil|
|000001e0| 6c 72 40 74 65 6b 72 65 | 64 2e 54 45 4b 2e 43 4f |lr@tekre|d.TEK.CO|
|000001f0| 4d 0a 4c 69 6e 65 73 3a | 20 39 30 37 0a 41 70 70 |M.Lines:| 907.App|
|00000200| 72 6f 76 65 64 3a 20 62 | 69 6c 6c 72 40 74 65 6b |roved: b|illr@tek|
|00000210| 72 65 64 2e 54 45 4b 2e | 43 4f 4d 0a 0a 53 75 62 |red.TEK.|COM..Sub|
|00000220| 6d 69 74 74 65 64 20 62 | 79 3a 20 53 61 6c 79 65 |mitted b|y: Salye|
|00000230| 72 44 45 20 3c 64 65 73 | 40 64 72 75 68 69 2e 61 |rDE <des|@druhi.a|
|00000240| 74 74 2e 63 6f 6d 3e 0a | 43 6f 6d 70 2e 73 6f 75 |tt.com>.|Comp.sou|
|00000250| 72 63 65 73 2e 67 61 6d | 65 73 3a 20 56 6f 6c 75 |rces.gam|es: Volu|
|00000260| 6d 65 20 31 2c 20 49 73 | 73 75 65 20 39 37 0a 41 |me 1, Is|sue 97.A|
|00000270| 72 63 68 69 76 65 2d 6e | 61 6d 65 3a 20 72 6e 64 |rchive-n|ame: rnd|
|00000280| 0a 0a 0a 23 21 20 2f 62 | 69 6e 2f 73 68 0a 23 20 |...#! /b|in/sh.# |
|00000290| 54 68 69 73 20 69 73 20 | 61 20 73 68 65 6c 6c 20 |This is |a shell |
|000002a0| 61 72 63 68 69 76 65 2e | 20 20 52 65 6d 6f 76 65 |archive.| Remove|
|000002b0| 20 61 6e 79 74 68 69 6e | 67 20 62 65 66 6f 72 65 | anythin|g before|
|000002c0| 20 74 68 69 73 20 6c 69 | 6e 65 2c 20 74 68 65 6e | this li|ne, then|
|000002d0| 20 75 6e 70 61 63 6b 0a | 23 20 69 74 20 62 79 20 | unpack.|# it by |
|000002e0| 73 61 76 69 6e 67 20 69 | 74 20 69 6e 74 6f 20 61 |saving i|t into a|
|000002f0| 20 66 69 6c 65 20 61 6e | 64 20 74 79 70 69 6e 67 | file an|d typing|
|00000300| 20 22 73 68 20 66 69 6c | 65 22 2e 20 20 54 6f 20 | "sh fil|e". To |
|00000310| 6f 76 65 72 77 72 69 74 | 65 20 65 78 69 73 74 69 |overwrit|e existi|
|00000320| 6e 67 0a 23 20 66 69 6c | 65 73 2c 20 74 79 70 65 |ng.# fil|es, type|
|00000330| 20 22 73 68 20 66 69 6c | 65 20 2d 63 22 2e 20 20 | "sh fil|e -c". |
|00000340| 59 6f 75 20 63 61 6e 20 | 61 6c 73 6f 20 66 65 65 |You can |also fee|
|00000350| 64 20 74 68 69 73 20 61 | 73 20 73 74 61 6e 64 61 |d this a|s standa|
|00000360| 72 64 20 69 6e 70 75 74 | 20 76 69 61 0a 23 20 75 |rd input| via.# u|
|00000370| 6e 73 68 61 72 2c 20 6f | 72 20 62 79 20 74 79 70 |nshar, o|r by typ|
|00000380| 69 6e 67 20 22 73 68 20 | 3c 66 69 6c 65 22 2c 20 |ing "sh |<file", |
|00000390| 65 2e 67 2e 2e 20 20 49 | 66 20 74 68 69 73 20 61 |e.g.. I|f this a|
|000003a0| 72 63 68 69 76 65 20 69 | 73 20 63 6f 6d 70 6c 65 |rchive i|s comple|
|000003b0| 74 65 2c 20 79 6f 75 0a | 23 20 77 69 6c 6c 20 73 |te, you.|# will s|
|000003c0| 65 65 20 74 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |ee the f|ollowing|
|000003d0| 20 6d 65 73 73 61 67 65 | 20 61 74 20 74 68 65 20 | message| at the |
|000003e0| 65 6e 64 3a 0a 23 09 09 | 22 45 6e 64 20 6f 66 20 |end:.#..|"End of |
|000003f0| 73 68 65 6c 6c 20 61 72 | 63 68 69 76 65 2e 22 0a |shell ar|chive.".|
|00000400| 23 20 43 6f 6e 74 65 6e | 74 73 3a 20 20 52 45 41 |# Conten|ts: REA|
|00000410| 44 4d 45 20 4d 61 6b 65 | 66 69 6c 65 20 72 6e 64 |DME Make|file rnd|
|00000420| 2e 36 20 72 6e 64 2e 63 | 20 44 75 6e 67 65 6f 6e |.6 rnd.c| Dungeon|
|00000430| 20 44 75 6e 67 65 6f 6e | 2f 43 41 54 5f 4d 45 0a | Dungeon|/CAT_ME.|
|00000440| 23 20 20 20 44 75 6e 67 | 65 6f 6e 2f 43 6f 72 72 |# Dung|eon/Corr|
|00000450| 69 64 6f 72 20 44 75 6e | 67 65 6f 6e 2f 43 72 65 |idor Dun|geon/Cre|
|00000460| 61 74 75 72 65 20 44 75 | 6e 67 65 6f 6e 2f 44 6f |ature Du|ngeon/Do|
|00000470| 6f 72 20 44 75 6e 67 65 | 6f 6e 2f 52 6f 6f 6d 0a |or Dunge|on/Room.|
|00000480| 23 20 20 20 44 75 6e 67 | 65 6f 6e 2f 62 65 68 69 |# Dung|eon/behi|
|00000490| 6e 64 5f 64 6f 6f 72 20 | 44 75 6e 67 65 6f 6e 2f |nd_door |Dungeon/|
|000004a0| 63 6f 72 72 5f 63 6f 6e | 74 20 44 75 6e 67 65 6f |corr_con|t Dungeo|
|000004b0| 6e 2f 63 6f 72 72 5f 73 | 65 63 74 0a 23 20 20 20 |n/corr_s|ect.# |
|000004c0| 44 75 6e 67 65 6f 6e 2f | 65 78 69 74 73 20 44 75 |Dungeon/|exits Du|
|000004d0| 6e 67 65 6f 6e 2f 6a 65 | 77 65 6c 20 44 75 6e 67 |ngeon/je|wel Dung|
|000004e0| 65 6f 6e 2f 6d 6f 6e 73 | 74 65 72 20 44 75 6e 67 |eon/mons|ter Dung|
|000004f0| 65 6f 6e 2f 72 6f 6f 6d | 5f 63 6f 6e 74 0a 23 20 |eon/room|_cont.# |
|00000500| 20 20 44 75 6e 67 65 6f | 6e 2f 74 72 61 70 20 44 | Dungeo|n/trap D|
|00000510| 75 6e 67 65 6f 6e 2f 74 | 72 65 61 73 75 72 65 20 |ungeon/t|reasure |
|00000520| 44 75 6e 67 65 6f 6e 2f | 75 6e 64 65 61 64 20 44 |Dungeon/|undead D|
|00000530| 75 6e 67 65 6f 6e 2f 77 | 65 61 70 6f 6e 0a 23 20 |ungeon/w|eapon.# |
|00000540| 57 72 61 70 70 65 64 20 | 62 79 20 62 69 6c 6c 72 |Wrapped |by billr|
|00000550| 40 74 65 6b 72 65 64 20 | 6f 6e 20 4d 6f 6e 20 4a |@tekred |on Mon J|
|00000560| 75 6c 20 32 30 20 31 34 | 3a 31 38 3a 30 34 20 31 |ul 20 14|:18:04 1|
|00000570| 39 38 37 0a 50 41 54 48 | 3d 2f 62 69 6e 3a 2f 75 |987.PATH|=/bin:/u|
|00000580| 73 72 2f 62 69 6e 3a 2f | 75 73 72 2f 75 63 62 20 |sr/bin:/|usr/ucb |
|00000590| 3b 20 65 78 70 6f 72 74 | 20 50 41 54 48 0a 69 66 |; export| PATH.if|
|000005a0| 20 74 65 73 74 20 2d 66 | 20 52 45 41 44 4d 45 20 | test -f| README |
|000005b0| 2d 61 20 22 24 7b 31 7d | 22 20 21 3d 20 22 2d 63 |-a "${1}|" != "-c|
|000005c0| 22 20 3b 20 74 68 65 6e | 20 0a 20 20 65 63 68 6f |" ; then| . echo|
|000005d0| 20 73 68 61 72 3a 20 57 | 69 6c 6c 20 6e 6f 74 20 | shar: W|ill not |
|000005e0| 6f 76 65 72 2d 77 72 69 | 74 65 20 65 78 69 73 74 |over-wri|te exist|
|000005f0| 69 6e 67 20 66 69 6c 65 | 20 5c 22 52 45 41 44 4d |ing file| \"READM|
|00000600| 45 5c 22 0a 65 6c 73 65 | 0a 65 63 68 6f 20 73 68 |E\".else|.echo sh|
|00000610| 61 72 3a 20 45 78 74 72 | 61 63 74 69 6e 67 20 5c |ar: Extr|acting \|
|00000620| 22 52 45 41 44 4d 45 5c | 22 20 5c 28 31 37 36 32 |"README\|" \(1762|
|00000630| 20 63 68 61 72 61 63 74 | 65 72 73 5c 29 0a 73 65 | charact|ers\).se|
|00000640| 64 20 22 73 2f 5e 58 2f | 2f 22 20 3e 52 45 41 44 |d "s/^X/|/" >READ|
|00000650| 4d 45 20 3c 3c 27 45 4e | 44 5f 4f 46 5f 52 45 41 |ME <<'EN|D_OF_REA|
|00000660| 44 4d 45 27 0a 58 48 69 | 20 61 6c 6c 20 79 6f 75 |DME'.XHi| all you|
|00000670| 20 6e 65 74 2d 70 65 6f | 70 6c 65 21 0a 58 0a 58 | net-peo|ple!.X.X|
|00000680| 5b 49 20 6b 6e 6f 77 20 | 69 74 27 73 20 62 65 65 |[I know |it's bee|
|00000690| 6e 20 61 20 6c 6f 6e 67 | 20 74 69 6d 65 2c 20 62 |n a long| time, b|
|000006a0| 75 74 20 2e 2e 2e 20 5d | 0a 58 0a 58 20 20 20 20 |ut ... ]|.X.X |
|000006b0| 57 68 65 6e 20 49 20 73 | 61 77 20 4d 61 72 63 75 |When I s|aw Marcu|
|000006c0| 73 20 52 61 6e 75 6d 27 | 73 20 52 61 6e 64 6f 6d |s Ranum'|s Random|
|000006d0| 20 73 74 75 66 66 20 67 | 65 6e 65 72 61 74 6f 72 | stuff g|enerator|
|000006e0| 2c 20 49 20 74 68 6f 75 | 67 68 74 0a 58 69 74 20 |, I thou|ght.Xit |
|000006f0| 77 61 73 20 61 20 6e 6f | 76 65 6c 20 69 64 65 61 |was a no|vel idea|
|00000700| 2c 20 62 75 74 20 6c 69 | 6d 69 74 69 6e 67 2e 20 |, but li|miting. |
|00000710| 20 49 20 77 61 6e 74 65 | 64 20 61 20 77 61 79 20 | I wante|d a way |
|00000720| 74 6f 20 6e 65 73 74 20 | 74 61 62 6c 65 73 0a 58 |to nest |tables.X|
|00000730| 61 6e 64 20 73 75 62 74 | 61 62 6c 65 73 20 69 6e |and subt|ables in|
|00000740| 20 74 68 65 20 73 75 62 | 74 61 62 6c 65 73 20 74 | the sub|tables t|
|00000750| 68 65 6d 73 65 6c 76 65 | 73 2e 20 20 53 6f 20 49 |hemselve|s. So I|
|00000760| 20 68 61 76 65 20 64 6f | 6e 65 20 74 68 61 74 2e | have do|ne that.|
|00000770| 0a 58 49 74 20 77 61 73 | 20 66 61 69 72 6c 79 20 |.XIt was| fairly |
|00000780| 73 69 6d 70 6c 65 20 74 | 6f 20 64 6f 2c 20 28 61 |simple t|o do, (a|
|00000790| 20 74 72 69 62 75 74 65 | 20 74 6f 20 4d 61 72 63 | tribute| to Marc|
|000007a0| 75 73 20 66 6f 72 20 65 | 61 73 69 6c 79 0a 58 6d |us for e|asily.Xm|
|000007b0| 6f 64 69 66 69 65 64 20 | 63 6f 64 65 29 20 6a 75 |odified |code) ju|
|000007c0| 73 74 20 63 68 61 6e 67 | 65 20 74 68 65 20 27 64 |st chang|e the 'd|
|000007d0| 6f 68 61 63 6b 28 29 27 | 20 63 61 6c 6c 20 69 6e |ohack()'| call in|
|000007e0| 20 27 64 6f 73 75 62 74 | 61 62 6c 65 27 20 74 6f | 'dosubt|able' to|
|000007f0| 0a 58 61 20 27 64 6f 70 | 61 72 73 65 28 29 27 20 |.Xa 'dop|arse()' |
|00000800| 63 61 6c 6c 20 69 6e 73 | 74 65 61 64 20 28 61 66 |call ins|tead (af|
|00000810| 74 65 72 20 73 74 72 69 | 70 70 69 6e 67 20 6f 66 |ter stri|pping of|
|00000820| 66 20 74 68 65 20 6e 75 | 6d 62 65 72 29 2e 0a 58 |f the nu|mber)..X|
|00000830| 0a 58 20 20 20 20 54 68 | 69 73 20 67 72 65 61 74 |.X Th|is great|
|00000840| 6c 79 20 65 78 74 65 6e | 64 73 20 74 68 65 20 70 |ly exten|ds the p|
|00000850| 6f 73 73 69 62 69 6c 69 | 74 69 65 73 20 6f 66 20 |ossibili|ties of |
|00000860| 74 68 65 20 73 79 73 74 | 65 6d 2c 20 62 75 74 0a |the syst|em, but.|
|00000870| 58 6d 61 6b 65 73 20 69 | 74 20 6d 75 63 68 20 6d |Xmakes i|t much m|
|00000880| 6f 72 65 20 6c 69 6b 65 | 6c 79 20 74 6f 20 62 6c |ore like|ly to bl|
|00000890| 6f 77 20 79 6f 75 72 20 | 73 74 61 63 6b 20 64 75 |ow your |stack du|
|000008a0| 65 20 74 6f 20 72 65 63 | 75 72 73 69 6f 6e 2e 0a |e to rec|ursion..|
|000008b0| 58 42 75 74 20 69 66 20 | 79 6f 75 20 61 72 65 20 |XBut if |you are |
|000008c0| 63 61 72 65 66 75 6c 2c | 20 69 74 20 73 68 6f 75 |careful,| it shou|
|000008d0| 6c 64 20 77 6f 72 6b 2e | 0a 58 0a 58 20 20 20 20 |ld work.|.X.X |
|000008e0| 49 20 61 6c 73 6f 20 61 | 64 64 65 64 20 61 20 66 |I also a|dded a f|
|000008f0| 65 77 20 27 66 65 61 74 | 75 72 65 73 27 20 2d 20 |ew 'feat|ures' - |
|00000900| 74 68 65 72 65 20 69 73 | 20 61 20 64 65 66 61 75 |there is| a defau|
|00000910| 6c 74 20 6f 66 20 31 30 | 0a 58 69 74 65 72 61 74 |lt of 10|.Xiterat|
|00000920| 69 6f 6e 73 20 69 66 20 | 79 6f 75 20 68 69 74 20 |ions if |you hit |
|00000930| 43 2f 52 2c 20 65 61 63 | 68 20 72 6f 6c 6c 20 6f |C/R, eac|h roll o|
|00000940| 66 20 74 68 65 20 64 69 | 63 65 20 75 73 65 73 20 |f the di|ce uses |
|00000950| 74 68 65 20 27 62 65 73 | 74 0a 58 6f 66 20 74 68 |the 'bes|t.Xof th|
|00000960| 72 65 65 20 74 72 69 65 | 73 2c 20 61 6e 64 20 74 |ree trie|s, and t|
|00000970| 68 65 20 73 74 61 74 20 | 63 6f 6d 6d 61 6e 64 20 |he stat |command |
|00000980| 68 61 73 20 62 65 65 6e | 20 6d 6f 64 69 66 69 65 |has been| modifie|
|00000990| 64 20 61 73 20 66 6f 6c | 6c 6f 77 73 3a 0a 58 0a |d as fol|lows:.X.|
|000009a0| 58 20 20 20 20 49 66 20 | 79 6f 75 20 70 75 74 20 |X If |you put |
|000009b0| 61 6e 20 27 2a 27 20 61 | 73 20 74 68 65 20 66 69 |an '*' a|s the fi|
|000009c0| 72 73 74 20 63 68 61 72 | 61 63 74 65 72 20 6f 66 |rst char|acter of|
|000009d0| 20 74 68 65 20 73 74 61 | 74 20 73 74 72 69 6e 67 | the sta|t string|
|000009e0| 2c 0a 58 74 68 65 20 70 | 72 69 6e 74 6f 75 74 20 |,.Xthe p|rintout |
|000009f0| 77 69 6c 6c 20 62 65 20 | 69 6e 20 61 6e 20 61 6c |will be |in an al|
|00000a00| 74 65 72 6e 61 74 65 20 | 66 6f 72 6d 61 74 2c 20 |ternate |format, |
|00000a10| 69 2e 65 2e 0a 58 09 73 | 74 61 74 20 47 6f 6c 64 |i.e..X.s|tat Gold|
|00000a20| 20 33 20 31 30 30 20 20 | 20 20 20 20 20 20 20 20 | 3 100 | |
|00000a30| 20 77 6f 75 6c 64 20 70 | 72 6f 64 75 63 65 3d 3e | would p|roduce=>|
|00000a40| 20 20 47 6f 6c 64 3a 20 | 32 33 30 0a 58 09 73 74 | Gold: |230.X.st|
|00000a50| 61 74 20 2a 47 6f 6c 64 | 5f 70 69 65 63 65 73 20 |at *Gold|_pieces |
|00000a60| 33 20 31 30 30 20 20 20 | 77 6f 75 6c 64 20 70 72 |3 100 |would pr|
|00000a70| 6f 64 75 63 65 3d 3e 20 | 20 31 36 30 20 47 6f 6c |oduce=> | 160 Gol|
|00000a80| 64 5f 70 69 65 63 65 73 | 0a 58 0a 58 20 20 20 20 |d_pieces|.X.X |
|00000a90| 41 6c 73 6f 20 69 6e 63 | 6c 75 64 65 64 20 69 73 |Also inc|luded is|
|00000aa0| 20 61 20 73 75 62 64 69 | 72 65 63 74 6f 72 79 20 | a subdi|rectory |
|00000ab0| 44 75 6e 67 65 6f 6e 2c | 20 77 68 69 63 68 20 75 |Dungeon,| which u|
|00000ac0| 73 65 73 20 74 68 65 73 | 65 20 6e 65 77 0a 58 66 |ses thes|e new.Xf|
|00000ad0| 65 61 74 75 72 65 73 20 | 74 6f 20 63 72 65 61 74 |eatures |to creat|
|00000ae0| 65 20 72 61 6e 64 6f 6d | 20 73 65 63 74 69 6f 6e |e random| section|
|00000af0| 73 20 6f 66 20 64 75 6e | 67 65 6f 6e 20 63 6f 72 |s of dun|geon cor|
|00000b00| 72 69 64 6f 72 73 2e 20 | 20 49 74 20 69 73 0a 58 |ridors. | It is.X|
|00000b10| 62 61 73 65 64 20 6c 6f | 6f 73 65 6c 79 20 6f 6e |based lo|osely on|
|00000b20| 20 61 20 44 75 6e 67 65 | 6f 6e 20 47 65 6e 65 72 | a Dunge|on Gener|
|00000b30| 61 74 6f 72 20 61 72 74 | 69 63 6c 65 20 69 6e 20 |ator art|icle in |
|00000b40| 61 20 6d 61 67 61 7a 69 | 6e 65 20 49 20 73 61 77 |a magazi|ne I saw|
|00000b50| 0a 58 6d 61 6e 79 20 6d | 6f 6f 6e 73 20 61 67 6f |.Xmany m|oons ago|
|00000b60| 20 28 49 20 64 6f 6e 27 | 74 20 72 65 6d 65 6d 62 | (I don'|t rememb|
|00000b70| 65 72 20 77 68 69 63 68 | 29 2e 20 20 4c 6f 6f 6b |er which|). Look|
|00000b80| 20 69 74 20 6f 76 65 72 | 20 61 6e 64 20 73 65 65 | it over| and see|
|00000b90| 0a 58 77 68 61 74 20 79 | 6f 75 20 63 61 6e 20 64 |.Xwhat y|ou can d|
|00000ba0| 6f 20 77 69 74 68 20 69 | 74 2e 0a 58 0a 58 20 20 |o with i|t..X.X |
|00000bb0| 20 20 49 27 76 65 20 6c | 6f 73 74 20 74 68 65 20 | I've l|ost the |
|00000bc0| 45 2d 4d 61 69 6c 20 61 | 64 64 72 65 73 73 20 6f |E-Mail a|ddress o|
|00000bd0| 66 20 4d 61 72 63 75 73 | 2c 20 73 6f 20 49 20 68 |f Marcus|, so I h|
|00000be0| 6f 70 65 20 68 65 20 73 | 65 65 73 0a 58 74 68 69 |ope he s|ees.Xthi|
|00000bf0| 73 20 61 6e 64 20 61 70 | 70 72 6f 76 65 73 20 6f |s and ap|proves o|
|00000c00| 66 20 74 68 65 20 63 68 | 61 6e 67 65 73 20 49 27 |f the ch|anges I'|
|00000c10| 76 65 20 6d 61 64 65 2e | 20 20 49 20 61 6c 73 6f |ve made.| I also|
|00000c20| 20 68 6f 70 65 20 65 76 | 65 72 79 6f 6e 65 0a 58 | hope ev|eryone.X|
|00000c30| 65 6c 73 65 20 63 61 6e | 20 75 73 65 20 74 68 69 |else can| use thi|
|00000c40| 73 20 74 6f 20 66 75 72 | 74 68 65 72 20 79 6f 75 |s to fur|ther you|
|00000c50| 72 20 44 75 6e 67 65 6f | 6e 20 65 6e 64 65 61 76 |r Dungeo|n endeav|
|00000c60| 6f 72 73 2e 0a 58 0a 58 | 09 52 65 61 6c 20 4c 69 |ors..X.X|.Real Li|
|00000c70| 66 65 3f 3a 09 44 61 6c | 65 20 53 61 6c 79 65 72 |fe?:.Dal|e Salyer|
|00000c80| 20 28 50 72 6f 67 72 61 | 6d 6d 65 72 20 6f 66 20 | (Progra|mmer of |
|00000c90| 74 68 65 20 54 68 69 72 | 64 20 4c 65 76 65 6c 29 |the Thir|d Level)|
|00000ca0| 0a 58 09 46 61 6e 74 61 | 73 79 3a 09 44 61 72 6b |.X.Fanta|sy:.Dark|
|00000cb0| 20 53 74 61 72 20 28 54 | 68 69 65 66 20 6f 66 20 | Star (T|hief of |
|00000cc0| 74 68 65 20 46 69 66 74 | 68 20 4c 65 76 65 6c 29 |the Fift|h Level)|
|00000cd0| 0a 58 09 09 09 43 6f 79 | 6f 74 65 20 28 48 61 6c |.X...Coy|ote (Hal|
|00000ce0| 66 2d 43 6f 79 6f 74 65 | 20 2d 20 52 61 6e 67 65 |f-Coyote| - Range|
|00000cf0| 72 20 6f 66 20 74 68 65 | 20 53 69 78 74 68 20 4c |r of the| Sixth L|
|00000d00| 65 76 65 6c 29 0a 58 0a | 58 09 45 2d 4d 61 69 6c |evel).X.|X.E-Mail|
|00000d10| 20 41 64 64 72 65 73 73 | 3a 09 2e 2e 2e 21 69 68 | Address|:....!ih|
|00000d20| 6e 70 34 21 64 72 75 68 | 69 21 64 65 73 0a 58 09 |np4!druh|i!des.X.|
|00000d30| 55 2e 53 2e 20 4d 61 69 | 6c 3a 09 41 54 26 54 20 |U.S. Mai|l:.AT&T |
|00000d40| 49 6e 66 6f 2e 20 53 79 | 73 74 65 6d 73 20 4c 61 |Info. Sy|stems La|
|00000d50| 62 6f 72 61 74 6f 72 69 | 65 73 0a 58 09 09 09 44 |boratori|es.X...D|
|00000d60| 65 6e 76 65 72 2c 20 43 | 4f 20 38 30 32 32 39 0a |enver, C|O 80229.|
|00000d70| 45 4e 44 5f 4f 46 5f 52 | 45 41 44 4d 45 0a 69 66 |END_OF_R|EADME.if|
|00000d80| 20 74 65 73 74 20 31 37 | 36 32 20 2d 6e 65 20 60 | test 17|62 -ne `|
|00000d90| 77 63 20 2d 63 20 3c 52 | 45 41 44 4d 45 60 3b 20 |wc -c <R|EADME`; |
|00000da0| 74 68 65 6e 0a 20 20 20 | 20 65 63 68 6f 20 73 68 |then. | echo sh|
|00000db0| 61 72 3a 20 5c 22 52 45 | 41 44 4d 45 5c 22 20 75 |ar: \"RE|ADME\" u|
|00000dc0| 6e 70 61 63 6b 65 64 20 | 77 69 74 68 20 77 72 6f |npacked |with wro|
|00000dd0| 6e 67 20 73 69 7a 65 21 | 0a 66 69 0a 23 20 65 6e |ng size!|.fi.# en|
|00000de0| 64 20 6f 66 20 6f 76 65 | 72 77 72 69 74 69 6e 67 |d of ove|rwriting|
|00000df0| 20 63 68 65 63 6b 0a 66 | 69 0a 69 66 20 74 65 73 | check.f|i.if tes|
|00000e00| 74 20 2d 66 20 4d 61 6b | 65 66 69 6c 65 20 2d 61 |t -f Mak|efile -a|
|00000e10| 20 22 24 7b 31 7d 22 20 | 21 3d 20 22 2d 63 22 20 | "${1}" |!= "-c" |
|00000e20| 3b 20 74 68 65 6e 20 0a | 20 20 65 63 68 6f 20 73 |; then .| echo s|
|00000e30| 68 61 72 3a 20 57 69 6c | 6c 20 6e 6f 74 20 6f 76 |har: Wil|l not ov|
|00000e40| 65 72 2d 77 72 69 74 65 | 20 65 78 69 73 74 69 6e |er-write| existin|
|00000e50| 67 20 66 69 6c 65 20 5c | 22 4d 61 6b 65 66 69 6c |g file \|"Makefil|
|00000e60| 65 5c 22 0a 65 6c 73 65 | 0a 65 63 68 6f 20 73 68 |e\".else|.echo sh|
|00000e70| 61 72 3a 20 45 78 74 72 | 61 63 74 69 6e 67 20 5c |ar: Extr|acting \|
|00000e80| 22 4d 61 6b 65 66 69 6c | 65 5c 22 20 5c 28 39 35 |"Makefil|e\" \(95|
|00000e90| 20 63 68 61 72 61 63 74 | 65 72 73 5c 29 0a 73 65 | charact|ers\).se|
|00000ea0| 64 20 22 73 2f 5e 58 2f | 2f 22 20 3e 4d 61 6b 65 |d "s/^X/|/" >Make|
|00000eb0| 66 69 6c 65 20 3c 3c 27 | 45 4e 44 5f 4f 46 5f 4d |file <<'|END_OF_M|
|00000ec0| 61 6b 65 66 69 6c 65 27 | 0a 58 23 20 4d 61 6b 65 |akefile'|.X# Make|
|00000ed0| 66 69 6c 65 20 66 6f 72 | 20 72 6e 64 20 2d 20 72 |file for| rnd - r|
|00000ee0| 61 6e 64 6f 6d 20 73 74 | 75 66 66 20 67 65 6e 65 |andom st|uff gene|
|00000ef0| 72 61 74 6f 72 0a 58 43 | 46 4c 41 47 53 20 3d 20 |rator.XC|FLAGS = |
|00000f00| 2d 4f 0a 58 0a 58 72 6e | 64 3a 09 72 6e 64 2e 63 |-O.X.Xrn|d:.rnd.c|
|00000f10| 0a 58 09 63 63 20 24 28 | 43 46 4c 41 47 53 29 20 |.X.cc $(|CFLAGS) |
|00000f20| 2d 6f 20 72 6e 64 20 72 | 6e 64 2e 63 0a 45 4e 44 |-o rnd r|nd.c.END|
|00000f30| 5f 4f 46 5f 4d 61 6b 65 | 66 69 6c 65 0a 69 66 20 |_OF_Make|file.if |
|00000f40| 74 65 73 74 20 39 35 20 | 2d 6e 65 20 60 77 63 20 |test 95 |-ne `wc |
|00000f50| 2d 63 20 3c 4d 61 6b 65 | 66 69 6c 65 60 3b 20 74 |-c <Make|file`; t|
|00000f60| 68 65 6e 0a 20 20 20 20 | 65 63 68 6f 20 73 68 61 |hen. |echo sha|
|00000f70| 72 3a 20 5c 22 4d 61 6b | 65 66 69 6c 65 5c 22 20 |r: \"Mak|efile\" |
|00000f80| 75 6e 70 61 63 6b 65 64 | 20 77 69 74 68 20 77 72 |unpacked| with wr|
|00000f90| 6f 6e 67 20 73 69 7a 65 | 21 0a 66 69 0a 23 20 65 |ong size|!.fi.# e|
|00000fa0| 6e 64 20 6f 66 20 6f 76 | 65 72 77 72 69 74 69 6e |nd of ov|erwritin|
|00000fb0| 67 20 63 68 65 63 6b 0a | 66 69 0a 69 66 20 74 65 |g check.|fi.if te|
|00000fc0| 73 74 20 2d 66 20 72 6e | 64 2e 36 20 2d 61 20 22 |st -f rn|d.6 -a "|
|00000fd0| 24 7b 31 7d 22 20 21 3d | 20 22 2d 63 22 20 3b 20 |${1}" !=| "-c" ; |
|00000fe0| 74 68 65 6e 20 0a 20 20 | 65 63 68 6f 20 73 68 61 |then . |echo sha|
|00000ff0| 72 3a 20 57 69 6c 6c 20 | 6e 6f 74 20 6f 76 65 72 |r: Will |not over|
|00001000| 2d 77 72 69 74 65 20 65 | 78 69 73 74 69 6e 67 20 |-write e|xisting |
|00001010| 66 69 6c 65 20 5c 22 72 | 6e 64 2e 36 5c 22 0a 65 |file \"r|nd.6\".e|
|00001020| 6c 73 65 0a 65 63 68 6f | 20 73 68 61 72 3a 20 45 |lse.echo| shar: E|
|00001030| 78 74 72 61 63 74 69 6e | 67 20 5c 22 72 6e 64 2e |xtractin|g \"rnd.|
|00001040| 36 5c 22 20 5c 28 36 34 | 32 35 20 63 68 61 72 61 |6\" \(64|25 chara|
|00001050| 63 74 65 72 73 5c 29 0a | 73 65 64 20 22 73 2f 5e |cters\).|sed "s/^|
|00001060| 58 2f 2f 22 20 3e 72 6e | 64 2e 36 20 3c 3c 27 45 |X//" >rn|d.6 <<'E|
|00001070| 4e 44 5f 4f 46 5f 72 6e | 64 2e 36 27 0a 58 2e 54 |ND_OF_rn|d.6'.X.T|
|00001080| 48 20 72 6e 64 20 36 20 | 20 31 32 2f 34 2f 38 36 |H rnd 6 | 12/4/86|
|00001090| 0a 58 2e 53 48 20 4e 41 | 4d 45 0a 58 72 6e 64 20 |.X.SH NA|ME.Xrnd |
|000010a0| 5c 2d 20 52 61 6e 64 6f | 6d 20 73 74 75 66 66 20 |\- Rando|m stuff |
|000010b0| 67 65 6e 65 72 61 74 6f | 72 0a 58 2e 53 48 20 53 |generato|r.X.SH S|
|000010c0| 59 4e 4f 50 53 49 53 0a | 58 2e 42 20 72 6e 64 0a |YNOPSIS.|X.B rnd.|
|000010d0| 58 66 69 6c 65 31 20 66 | 69 6c 65 32 2c 20 65 74 |Xfile1 f|ile2, et|
|000010e0| 63 2e 2e 2e 0a 58 2e 53 | 48 20 44 45 53 43 52 49 |c....X.S|H DESCRI|
|000010f0| 50 54 49 4f 4e 0a 58 2e | 49 20 72 6e 64 20 0a 58 |PTION.X.|I rnd .X|
|00001100| 72 65 61 64 73 20 61 20 | 66 69 6c 65 20 61 6e 64 |reads a |file and|
|00001110| 20 77 72 69 74 65 73 20 | 67 65 6e 65 72 61 74 65 | writes |generate|
|00001120| 64 20 64 61 74 61 20 74 | 6f 20 74 68 65 20 73 74 |d data t|o the st|
|00001130| 61 6e 64 61 72 64 20 6f | 75 74 70 75 74 2e 0a 58 |andard o|utput..X|
|00001140| 49 66 20 6d 6f 72 65 20 | 74 68 61 6e 20 6f 6e 65 |If more |than one|
|00001150| 20 66 69 6c 65 20 69 73 | 20 73 70 65 63 69 66 69 | file is| specifi|
|00001160| 65 64 2c 20 74 68 65 20 | 66 69 6c 65 73 20 61 72 |ed, the |files ar|
|00001170| 65 20 75 73 65 64 20 61 | 73 20 64 65 73 63 72 69 |e used a|s descri|
|00001180| 70 74 69 6f 6e 73 0a 58 | 69 6e 20 73 65 71 75 65 |ptions.X|in seque|
|00001190| 6e 63 65 20 61 6e 64 20 | 6d 65 72 67 65 64 20 6f |nce and |merged o|
|000011a0| 75 74 70 75 74 20 69 73 | 20 77 72 69 74 74 65 6e |utput is| written|
|000011b0| 20 74 6f 20 74 68 65 20 | 73 74 61 6e 64 61 72 64 | to the |standard|
|000011c0| 20 6f 75 74 70 75 74 2e | 0a 58 54 77 6f 20 74 79 | output.|.XTwo ty|
|000011d0| 70 65 73 20 6f 66 20 66 | 69 6c 65 73 20 61 72 65 |pes of f|iles are|
|000011e0| 20 72 65 63 6f 67 6e 69 | 7a 65 64 3a 20 5c 66 42 | recogni|zed: \fB|
|000011f0| 74 61 62 6c 65 5c 66 50 | 20 66 69 6c 65 73 2c 20 |table\fP| files, |
|00001200| 61 6e 64 20 5c 66 42 73 | 75 62 74 61 62 6c 65 5c |and \fBs|ubtable\|
|00001210| 66 50 20 66 69 6c 65 73 | 2e 0a 58 45 61 63 68 20 |fP files|..XEach |
|00001220| 66 69 6c 65 20 73 70 65 | 63 69 66 69 65 64 20 6f |file spe|cified o|
|00001230| 6e 20 74 68 65 20 63 6f | 6d 6d 61 6e 64 20 6c 69 |n the co|mmand li|
|00001240| 6e 65 20 6d 75 73 74 20 | 62 65 20 61 20 5c 66 42 |ne must |be a \fB|
|00001250| 74 61 62 6c 65 5c 66 50 | 20 66 69 6c 65 2e 0a 58 |table\fP| file..X|
|00001260| 0a 58 41 20 74 61 62 6c | 65 20 66 69 6c 65 20 63 |.XA tabl|e file c|
|00001270| 61 6e 20 63 6f 6e 74 61 | 69 6e 20 73 65 76 65 72 |an conta|in sever|
|00001280| 61 6c 20 74 79 70 65 73 | 20 6f 66 20 69 6e 66 6f |al types| of info|
|00001290| 72 6d 61 74 69 6f 6e 3a | 0a 58 2e 54 50 20 38 0a |rmation:|.X.TP 8.|
|000012a0| 58 5c 28 62 75 20 5c 66 | 42 54 65 78 74 20 61 6e |X\(bu \f|BText an|
|000012b0| 64 20 54 65 78 74 2d 66 | 6f 72 6d 61 74 73 3a 5c |d Text-f|ormats:\|
|000012c0| 66 50 0a 58 54 68 65 73 | 65 20 61 72 65 20 73 69 |fP.XThes|e are si|
|000012d0| 6d 70 6c 79 20 74 65 78 | 74 20 74 68 61 74 20 77 |mply tex|t that w|
|000012e0| 69 6c 6c 20 62 65 0a 58 | 69 6e 63 6c 75 64 65 64 |ill be.X|included|
|000012f0| 20 69 6e 20 74 68 65 20 | 6f 75 74 70 75 74 2e 20 | in the |output. |
|00001300| 54 68 65 72 65 20 61 72 | 65 2c 20 68 6f 77 65 76 |There ar|e, howev|
|00001310| 65 72 2c 20 61 20 66 65 | 77 20 73 69 6d 70 6c 65 |er, a fe|w simple|
|00001320| 20 72 75 6c 65 73 2e 0a | 58 41 6e 79 20 74 65 78 | rules..|XAny tex|
|00001330| 74 20 73 74 72 69 6e 67 | 20 65 6e 64 69 6e 67 20 |t string| ending |
|00001340| 69 6e 20 61 20 27 3a 27 | 20 28 6e 6f 20 73 70 61 |in a ':'| (no spa|
|00001350| 63 65 20 61 66 74 65 72 | 77 61 72 64 73 29 20 77 |ce after|wards) w|
|00001360| 69 6c 6c 20 4e 4f 54 0a | 58 68 61 76 65 20 61 20 |ill NOT.|Xhave a |
|00001370| 6e 65 77 6c 69 6e 65 20 | 61 70 70 65 6e 64 65 64 |newline |appended|
|00001380| 20 61 66 74 65 72 20 69 | 74 2e 20 54 68 69 73 20 | after i|t. This |
|00001390| 69 73 20 74 6f 20 61 6c | 6c 6f 77 20 61 20 75 73 |is to al|low a us|
|000013a0| 65 72 20 74 6f 0a 58 68 | 61 76 65 20 74 68 65 20 |er to.Xh|ave the |
|000013b0| 6f 75 74 70 75 74 20 66 | 72 6f 6d 20 61 20 73 75 |output f|rom a su|
|000013c0| 62 74 61 62 6c 65 20 70 | 6c 61 63 65 64 20 61 66 |btable p|laced af|
|000013d0| 74 65 72 20 61 20 74 65 | 78 74 20 73 74 72 69 6e |ter a te|xt strin|
|000013e0| 67 2e 0a 58 4f 74 68 65 | 72 20 74 65 78 74 20 74 |g..XOthe|r text t|
|000013f0| 68 61 74 20 64 6f 65 73 | 20 6e 6f 74 20 68 61 76 |hat does| not hav|
|00001400| 65 20 61 20 27 3a 27 20 | 61 73 20 74 68 65 20 6c |e a ':' |as the l|
|00001410| 61 73 74 20 63 68 61 72 | 61 63 74 65 72 20 62 65 |ast char|acter be|
|00001420| 66 6f 72 65 0a 58 61 20 | 6e 65 77 6c 69 6e 65 20 |fore.Xa |newline |
|00001430| 69 73 20 70 72 69 6e 74 | 65 64 20 61 73 20 69 73 |is print|ed as is|
|00001440| 2e 0a 58 2e 54 50 0a 58 | 5c 28 62 75 20 5c 66 42 |..X.TP.X|\(bu \fB|
|00001450| 54 61 62 73 20 61 6e 64 | 20 46 6f 72 6d 66 65 65 |Tabs and| Formfee|
|00001460| 64 73 3a 5c 66 50 0a 58 | 54 6f 20 69 6e 73 65 72 |ds:\fP.X|To inser|
|00001470| 74 20 74 61 62 73 20 61 | 6e 64 20 66 6f 72 6d 66 |t tabs a|nd formf|
|00001480| 65 65 64 73 2c 20 61 20 | 5c 66 42 5c 5c 74 5c 66 |eeds, a |\fB\\t\f|
|00001490| 50 20 28 74 61 62 29 0a | 58 6f 72 20 61 20 5c 66 |P (tab).|Xor a \f|
|000014a0| 42 5c 5c 6c 5c 66 50 20 | 28 66 6f 72 6d 66 65 65 |B\\l\fP |(formfee|
|000014b0| 64 20 5e 4c 29 20 69 73 | 20 70 6c 61 63 65 64 20 |d ^L) is| placed |
|000014c0| 61 73 20 74 68 65 20 4f | 4e 4c 59 20 74 68 69 6e |as the O|NLY thin|
|000014d0| 67 20 6f 6e 20 74 68 61 | 74 20 6c 69 6e 65 2e 20 |g on tha|t line. |
|000014e0| 0a 58 54 68 65 72 65 20 | 6d 75 73 74 20 62 65 20 |.XThere |must be |
|000014f0| 6e 6f 20 6f 74 68 65 72 | 20 62 6c 61 6e 6b 20 73 |no other| blank s|
|00001500| 70 61 63 65 73 2c 20 65 | 74 63 2e 20 54 68 69 73 |paces, e|tc. This|
|00001510| 20 69 73 20 69 6e 65 6c | 65 67 61 6e 74 2c 20 62 | is inel|egant, b|
|00001520| 75 74 0a 58 61 6c 6c 6f | 77 73 20 74 68 65 20 70 |ut.Xallo|ws the p|
|00001530| 72 6f 67 72 61 6d 20 74 | 6f 20 72 75 6e 20 72 65 |rogram t|o run re|
|00001540| 61 73 6f 6e 61 62 6c 79 | 20 66 61 73 74 2e 20 49 |asonably| fast. I|
|00001550| 66 20 61 20 74 61 62 20 | 69 73 20 63 6f 64 65 64 |f a tab |is coded|
|00001560| 2c 20 74 68 65 0a 58 70 | 72 6f 67 72 61 6d 20 64 |, the.Xp|rogram d|
|00001570| 6f 65 73 20 4e 4f 54 20 | 61 75 74 6f 6d 61 74 69 |oes NOT |automati|
|00001580| 63 61 6c 6c 79 20 67 65 | 6e 65 72 61 74 65 20 61 |cally ge|nerate a|
|00001590| 20 6e 65 77 6c 69 6e 65 | 20 61 66 74 65 72 20 69 | newline| after i|
|000015a0| 74 2e 20 54 68 69 73 0a | 58 69 73 20 74 6f 20 61 |t. This.|Xis to a|
|000015b0| 6c 6c 6f 77 20 61 20 75 | 73 65 72 20 74 6f 20 73 |llow a u|ser to s|
|000015c0| 65 70 61 72 61 74 65 20 | 73 74 61 74 73 20 77 69 |eparate |stats wi|
|000015d0| 74 68 20 74 61 62 73 20 | 72 65 61 73 6f 6e 61 62 |th tabs |reasonab|
|000015e0| 6c 79 20 65 61 73 69 6c | 79 2e 0a 58 2e 54 50 0a |ly easil|y..X.TP.|
|000015f0| 58 5c 28 62 75 20 5c 66 | 42 53 74 61 74 20 63 6f |X\(bu \f|BStat co|
|00001600| 6d 6d 61 6e 64 73 3a 5c | 66 50 0a 58 41 20 73 74 |mmands:\|fP.XA st|
|00001610| 61 74 20 63 6f 6d 6d 61 | 6e 64 20 67 6f 65 73 20 |at comma|nd goes |
|00001620| 61 74 20 74 68 65 20 62 | 65 67 69 6e 6e 69 6e 67 |at the b|eginning|
|00001630| 20 6f 66 20 61 6e 20 0a | 58 6f 74 68 65 72 77 69 | of an .|Xotherwi|
|00001640| 73 65 20 65 6d 70 74 79 | 20 6c 69 6e 65 2c 20 69 |se empty| line, i|
|00001650| 6e 20 74 68 65 20 66 6f | 72 6d 61 74 3a 0a 58 2e |n the fo|rmat:.X.|
|00001660| 6e 66 0a 58 0a 58 20 20 | 20 20 20 5c 66 42 73 74 |nf.X.X | \fBst|
|00001670| 61 74 5c 66 50 20 3c 73 | 74 72 69 6e 67 3e 20 3c |at\fP <s|tring> <|
|00001680| 23 20 6f 66 20 64 69 63 | 65 3e 20 3c 74 79 70 65 |# of dic|e> <type|
|00001690| 20 6f 66 20 64 69 63 65 | 3e 0a 58 2e 66 69 0a 58 | of dice|>.X.fi.X|
|000016a0| 0a 58 5c 66 49 72 6e 64 | 5c 66 50 20 77 69 6c 6c |.X\fIrnd|\fP will|
|000016b0| 20 74 68 65 6e 20 72 6f | 6c 6c 20 74 68 65 20 61 | then ro|ll the a|
|000016c0| 70 70 72 6f 70 72 69 61 | 74 65 20 6e 75 6d 62 65 |ppropria|te numbe|
|000016d0| 72 20 6f 66 20 4e 2d 73 | 69 64 65 64 20 64 69 63 |r of N-s|ided dic|
|000016e0| 65 2c 20 61 6e 64 0a 58 | 70 72 69 6e 74 20 74 68 |e, and.X|print th|
|000016f0| 65 20 73 74 61 74 20 6f | 6e 20 74 68 65 20 73 74 |e stat o|n the st|
|00001700| 61 6e 64 61 72 64 20 6f | 75 74 70 75 74 2e 0a 58 |andard o|utput..X|
|00001710| 54 68 65 20 3c 73 74 72 | 69 6e 67 3e 20 6d 75 73 |The <str|ing> mus|
|00001720| 74 20 6e 6f 74 20 68 61 | 76 65 20 61 6e 79 20 73 |t not ha|ve any s|
|00001730| 70 61 63 65 73 20 69 6e | 20 69 74 2e 0a 58 0a 58 |paces in| it..X.X|
|00001740| 4e 6f 72 6d 61 6c 20 6f | 75 74 70 75 74 20 66 6f |Normal o|utput fo|
|00001750| 72 6d 61 74 20 69 73 3a | 0a 58 0a 58 2e 6e 66 0a |rmat is:|.X.X.nf.|
|00001760| 58 20 20 20 20 20 5c 66 | 42 3c 73 74 72 69 6e 67 |X \f|B<string|
|00001770| 3e 3a 20 3c 6e 75 6d 62 | 65 72 3e 5c 66 50 0a 58 |>: <numb|er>\fP.X|
|00001780| 2e 66 69 0a 58 0a 58 68 | 6f 77 65 76 65 72 20 69 |.fi.X.Xh|owever i|
|00001790| 66 20 79 6f 75 20 6d 61 | 6b 65 20 74 68 65 20 66 |f you ma|ke the f|
|000017a0| 69 72 73 74 20 63 68 61 | 72 61 63 74 65 72 20 6f |irst cha|racter o|
|000017b0| 66 20 74 68 65 20 3c 73 | 74 72 69 6e 67 3e 0a 58 |f the <s|tring>.X|
|000017c0| 61 20 27 2a 27 20 74 68 | 65 20 66 6f 72 6d 61 74 |a '*' th|e format|
|000017d0| 20 77 69 6c 6c 20 62 65 | 3a 0a 58 0a 58 2e 6e 66 | will be|:.X.X.nf|
|000017e0| 0a 58 20 20 20 20 20 5c | 66 42 3c 6e 75 6d 62 65 |.X \|fB<numbe|
|000017f0| 72 3e 20 3c 73 74 72 69 | 6e 67 3e 5c 66 50 0a 58 |r> <stri|ng>\fP.X|
|00001800| 2e 66 69 0a 58 0a 58 77 | 69 74 68 6f 75 74 20 74 |.fi.X.Xw|ithout t|
|00001810| 68 65 20 27 2a 27 2e 0a | 58 54 68 69 73 20 69 73 |he '*'..|XThis is|
|00001820| 20 75 73 65 66 75 6c 20 | 74 6f 20 70 72 6f 64 75 | useful |to produ|
|00001830| 63 65 20 6d 65 73 73 61 | 67 65 73 20 6c 69 6b 65 |ce messa|ges like|
|00001840| 20 5c 66 42 33 30 30 20 | 67 6f 6c 64 5f 70 69 65 | \fB300 |gold_pie|
|00001850| 63 65 73 5c 66 50 20 6f | 72 0a 58 5c 66 42 31 32 |ces\fP o|r.X\fB12|
|00001860| 20 6c 61 72 67 65 5f 64 | 69 61 6d 6f 6e 64 73 5c | large_d|iamonds\|
|00001870| 66 50 2e 0a 58 2e 54 50 | 0a 58 5c 28 62 75 20 53 |fP..X.TP|.X\(bu S|
|00001880| 75 62 74 61 62 6c 65 20 | 63 6f 6d 6d 61 6e 64 73 |ubtable |commands|
|00001890| 3a 20 61 20 73 75 62 74 | 61 62 6c 65 20 63 6f 6d |: a subt|able com|
|000018a0| 6d 61 6e 64 20 67 6f 65 | 73 20 61 74 20 74 68 65 |mand goe|s at the|
|000018b0| 20 62 65 67 69 6e 6e 69 | 6e 67 20 6f 66 0a 58 61 | beginni|ng of.Xa|
|000018c0| 6e 20 6f 74 68 65 72 77 | 69 73 65 20 65 6d 70 74 |n otherw|ise empt|
|000018d0| 79 20 6c 69 6e 65 2c 20 | 69 6e 20 74 68 65 20 66 |y line, |in the f|
|000018e0| 6f 72 6d 61 74 0a 58 2e | 6e 66 0a 58 0a 58 20 20 |ormat.X.|nf.X.X |
|000018f0| 20 20 20 5c 66 42 73 75 | 62 74 61 62 6c 65 5c 66 | \fBsu|btable\f|
|00001900| 50 20 3c 66 69 6c 65 6e | 61 6d 65 3e 20 3c 23 20 |P <filen|ame> <# |
|00001910| 6f 66 20 64 69 63 65 3e | 20 3c 74 79 70 65 20 6f |of dice>| <type o|
|00001920| 66 20 64 69 63 65 3e 0a | 58 0a 58 2e 66 69 0a 58 |f dice>.|X.X.fi.X|
|00001930| 5c 66 49 72 6e 64 5c 66 | 50 20 77 69 6c 6c 20 74 |\fIrnd\f|P will t|
|00001940| 68 65 6e 20 72 6f 6c 6c | 20 74 68 65 20 61 70 70 |hen roll| the app|
|00001950| 72 6f 70 72 69 61 74 65 | 20 6e 75 6d 62 65 72 20 |ropriate| number |
|00001960| 6f 66 20 4e 2d 73 69 64 | 65 64 20 64 69 63 65 2c |of N-sid|ed dice,|
|00001970| 20 61 6e 64 0a 58 6f 70 | 65 6e 20 74 68 65 20 73 | and.Xop|en the s|
|00001980| 75 62 74 61 62 6c 65 20 | 66 69 6c 65 2e 20 41 20 |ubtable |file. A |
|00001990| 73 75 62 74 61 62 6c 65 | 20 66 69 6c 65 20 69 73 |subtable| file is|
|000019a0| 20 63 6f 6e 73 74 72 75 | 63 74 65 64 20 61 73 20 | constru|cted as |
|000019b0| 66 6f 6c 6c 6f 77 73 3a | 0a 58 2e 6e 66 0a 58 0a |follows:|.X.nf.X.|
|000019c0| 58 20 20 20 20 20 3c 23 | 75 70 70 65 72 20 6c 69 |X <#|upper li|
|000019d0| 6d 69 74 3e 20 3c 63 6f | 6d 6d 61 6e 64 3e 0a 58 |mit> <co|mmand>.X|
|000019e0| 20 20 20 20 20 3c 23 75 | 70 70 65 72 20 6c 69 6d | <#u|pper lim|
|000019f0| 69 74 3e 20 3c 63 6f 6d | 6d 61 6e 64 3e 0a 58 20 |it> <com|mand>.X |
|00001a00| 20 20 20 20 2e 2e 2e 20 | 65 74 63 2e 0a 58 2e 66 | ... |etc..X.f|
|00001a10| 69 0a 58 57 68 65 72 65 | 20 3c 63 6f 6d 6d 61 6e |i.XWhere| <comman|
|00001a20| 64 3e 20 63 61 6e 20 62 | 65 20 74 65 78 74 2c 20 |d> can b|e text, |
|00001a30| 61 20 73 74 61 74 20 63 | 6f 6d 6d 61 6e 64 2c 20 |a stat c|ommand, |
|00001a40| 61 20 74 61 62 6c 65 20 | 63 6f 6d 6d 61 6e 64 2c |a table |command,|
|00001a50| 0a 58 6f 72 20 61 6e 6f | 74 68 65 72 20 73 75 62 |.Xor ano|ther sub|
|00001a60| 74 61 62 6c 65 20 63 6f | 6d 6d 61 6e 64 2e 0a 58 |table co|mmand..X|
|00001a70| 0a 58 53 75 62 74 61 62 | 6c 65 20 66 69 6c 65 73 |.XSubtab|le files|
|00001a80| 20 6d 61 79 20 6e 6f 74 | 20 63 6f 6e 74 61 69 6e | may not| contain|
|00001a90| 20 61 6e 79 20 65 78 74 | 72 61 6e 65 6f 75 73 20 | any ext|raneous |
|00001aa0| 74 65 78 74 20 28 75 6e | 6c 69 6b 65 20 74 61 62 |text (un|like tab|
|00001ab0| 6c 65 20 66 69 6c 65 73 | 29 0a 58 61 6e 64 20 61 |le files|).Xand a|
|00001ac0| 6c 6c 20 74 68 65 20 65 | 6e 74 72 69 65 73 20 6d |ll the e|ntries m|
|00001ad0| 75 73 74 20 62 65 20 69 | 6e 20 6f 72 64 65 72 2c |ust be i|n order,|
|00001ae0| 20 77 69 74 68 20 74 68 | 65 20 68 69 67 68 65 73 | with th|e highes|
|00001af0| 74 20 6e 75 6d 65 72 69 | 63 61 6c 20 65 6e 74 72 |t numeri|cal entr|
|00001b00| 79 20 61 73 20 74 68 65 | 0a 58 6c 61 73 74 20 6c |y as the|.Xlast l|
|00001b10| 69 6e 65 20 69 6e 20 74 | 68 65 20 66 69 6c 65 2c |ine in t|he file,|
|00001b20| 20 61 6e 64 20 74 68 65 | 20 6c 6f 77 65 73 74 20 | and the| lowest |
|00001b30| 6e 75 6d 65 72 69 63 61 | 6c 20 65 6e 74 72 79 20 |numerica|l entry |
|00001b40| 61 73 20 74 68 65 20 66 | 69 72 73 74 2e 0a 58 45 |as the f|irst..XE|
|00001b50| 61 63 68 20 6c 69 6e 65 | 20 6d 75 73 74 20 63 6f |ach line| must co|
|00001b60| 6e 74 61 69 6e 20 61 20 | 6e 75 6d 62 65 72 20 76 |ntain a |number v|
|00001b70| 61 6c 75 65 20 61 6e 64 | 20 61 20 63 6f 6d 6d 61 |alue and| a comma|
|00001b80| 6e 64 2c 20 6f 72 20 74 | 68 65 20 72 65 73 75 6c |nd, or t|he resul|
|00001b90| 74 73 0a 58 6d 61 79 20 | 62 65 20 75 6e 75 73 75 |ts.Xmay |be unusu|
|00001ba0| 61 6c 2e 20 0a 58 2e 54 | 50 0a 58 5c 28 62 75 20 |al. .X.T|P.X\(bu |
|00001bb0| 5c 66 42 54 61 62 6c 65 | 20 63 6f 6d 6d 61 6e 64 |\fBTable| command|
|00001bc0| 73 3a 5c 66 50 0a 58 61 | 20 74 61 62 6c 65 20 63 |s:\fP.Xa| table c|
|00001bd0| 61 6e 20 63 6f 6e 74 61 | 69 6e 20 61 20 6c 69 73 |an conta|in a lis|
|00001be0| 74 20 6f 66 20 74 61 62 | 6c 65 73 20 61 73 20 77 |t of tab|les as w|
|00001bf0| 65 6c 6c 20 61 73 0a 58 | 73 74 61 74 73 2c 20 66 |ell as.X|stats, f|
|00001c00| 6f 72 6d 61 74 20 63 6f | 6d 6d 61 6e 64 73 2c 20 |ormat co|mmands, |
|00001c10| 74 65 78 74 2c 20 61 6e | 64 20 73 75 62 74 61 62 |text, an|d subtab|
|00001c20| 6c 65 73 2e 20 45 61 63 | 68 20 74 61 62 6c 65 20 |les. Eac|h table |
|00001c30| 69 73 20 72 61 6e 64 6f | 6d 69 7a 65 64 0a 58 72 |is rando|mized.Xr|
|00001c40| 65 63 75 72 73 69 76 65 | 6c 79 2c 20 75 6e 74 69 |ecursive|ly, unti|
|00001c50| 6c 20 79 6f 75 72 20 73 | 74 61 63 6b 20 6f 76 65 |l your s|tack ove|
|00001c60| 72 66 6c 6f 77 73 2c 20 | 6f 72 20 69 74 20 72 65 |rflows, |or it re|
|00001c70| 74 75 72 6e 73 2c 20 77 | 68 69 63 68 65 76 65 72 |turns, w|hichever|
|00001c80| 20 63 6f 6d 65 73 0a 58 | 66 69 72 73 74 2e 20 53 | comes.X|first. S|
|00001c90| 74 61 63 6b 69 6e 67 20 | 74 61 62 6c 65 73 20 64 |tacking |tables d|
|00001ca0| 65 65 70 6c 79 20 69 73 | 20 75 73 75 61 6c 6c 79 |eeply is| usually|
|00001cb0| 20 6e 6f 74 20 6e 65 63 | 65 73 73 61 72 79 2c 20 | not nec|essary, |
|00001cc0| 73 69 6e 63 65 20 73 65 | 76 65 72 61 6c 0a 58 74 |since se|veral.Xt|
|00001cd0| 61 62 6c 65 73 20 63 61 | 6e 20 62 65 20 63 61 6c |ables ca|n be cal|
|00001ce0| 6c 65 64 20 6f 6e 20 74 | 68 65 20 63 6f 6d 6d 61 |led on t|he comma|
|00001cf0| 6e 64 20 6c 69 6e 65 2c | 20 61 6e 64 20 74 68 61 |nd line,| and tha|
|00001d00| 74 20 69 73 20 6d 75 63 | 68 20 73 61 66 65 72 2e |t is muc|h safer.|
|00001d10| 0a 58 57 68 65 6e 20 61 | 20 74 61 62 6c 65 20 63 |.XWhen a| table c|
|00001d20| 6f 6d 6d 61 6e 64 20 69 | 73 20 69 6e 76 6f 6b 65 |ommand i|s invoke|
|00001d30| 64 2c 20 69 74 20 6d 75 | 73 74 20 62 65 20 66 6f |d, it mu|st be fo|
|00001d40| 6c 6c 6f 77 65 64 20 62 | 79 20 74 77 6f 20 6e 75 |llowed b|y two nu|
|00001d50| 6d 62 65 72 73 0a 58 73 | 6f 20 74 68 61 74 20 74 |mbers.Xs|o that t|
|00001d60| 68 65 20 73 65 6d 69 2d | 62 72 61 69 6e 64 65 61 |he semi-|braindea|
|00001d70| 64 20 70 61 72 73 65 72 | 20 72 65 63 6f 67 6e 69 |d parser| recogni|
|00001d80| 7a 65 73 20 69 74 20 61 | 73 20 61 20 63 6f 6d 6d |zes it a|s a comm|
|00001d90| 61 6e 64 2e 0a 58 0a 58 | 2e 6e 66 0a 58 20 20 20 |and..X.X|.nf.X |
|00001da0| 20 20 5c 66 42 74 61 62 | 6c 65 5c 66 50 20 3c 66 | \fBtab|le\fP <f|
|00001db0| 69 6c 65 6e 61 6d 65 3e | 20 3c 62 6f 67 75 73 20 |ilename>| <bogus |
|00001dc0| 23 3e 3c 62 6f 67 75 73 | 20 23 3e 0a 58 2e 66 69 |#><bogus| #>.X.fi|
|00001dd0| 0a 58 0a 58 45 61 63 68 | 20 74 61 62 6c 65 20 63 |.X.XEach| table c|
|00001de0| 61 6e 20 63 6f 6e 74 61 | 69 6e 20 69 74 73 20 6f |an conta|in its o|
|00001df0| 77 6e 20 6c 69 73 74 20 | 6f 66 20 73 75 62 74 61 |wn list |of subta|
|00001e00| 62 6c 65 73 20 61 6e 64 | 20 73 74 61 74 73 2c 20 |bles and| stats, |
|00001e10| 61 73 20 77 65 6c 6c 20 | 61 73 20 74 65 78 74 0a |as well |as text.|
|00001e20| 58 61 6e 64 20 66 6f 72 | 6d 61 74 20 63 6f 6d 6d |Xand for|mat comm|
|00001e30| 61 6e 64 73 2e 20 54 68 | 69 73 20 69 73 20 6c 6f |ands. Th|is is lo|
|00001e40| 74 73 20 6f 66 20 66 75 | 6e 2c 20 73 69 6e 63 65 |ts of fu|n, since|
|00001e50| 20 69 74 20 61 6c 6c 6f | 77 73 20 74 68 65 20 64 | it allo|ws the d|
|00001e60| 69 73 63 65 72 6e 69 6e | 67 0a 58 44 4d 20 74 6f |iscernin|g.XDM to|
|00001e70| 20 6d 61 6b 65 20 61 20 | 76 61 72 69 65 74 79 20 | make a |variety |
|00001e80| 6f 66 20 6c 61 79 65 72 | 65 64 20 74 61 62 6c 65 |of layer|ed table|
|00001e90| 73 20 61 6e 64 20 67 69 | 76 65 73 20 65 78 63 65 |s and gi|ves exce|
|00001ea0| 6c 6c 65 6e 74 20 63 6f | 6e 74 72 6f 6c 0a 58 6f |llent co|ntrol.Xo|
|00001eb0| 76 65 72 20 68 6f 77 20 | 6d 75 63 68 20 69 73 20 |ver how |much is |
|00001ec0| 67 65 6e 65 72 61 74 65 | 64 2e 20 46 6f 72 20 65 |generate|d. For e|
|00001ed0| 78 61 6d 70 6c 65 20 69 | 66 20 79 6f 75 20 64 65 |xample i|f you de|
|00001ee0| 74 65 72 6d 69 6e 65 20 | 74 68 61 74 20 61 6e 20 |termine |that an |
|00001ef0| 65 6e 63 6f 75 6e 74 65 | 72 0a 58 63 6f 6e 73 69 |encounte|r.Xconsi|
|00001f00| 73 74 73 20 6f 66 20 6d | 6f 6e 73 74 65 72 73 2c |sts of m|onsters,|
|00001f10| 20 62 6f 6f 74 79 2c 20 | 61 6e 64 20 74 65 72 72 | booty, |and terr|
|00001f20| 61 69 6e 2c 20 79 6f 75 | 20 63 6f 75 6c 64 20 68 |ain, you| could h|
|00001f30| 61 76 65 20 61 20 74 61 | 62 6c 65 20 74 68 61 74 |ave a ta|ble that|
|00001f40| 0a 58 69 6e 76 6f 6b 65 | 64 20 74 68 65 20 6d 6f |.Xinvoke|d the mo|
|00001f50| 6e 73 74 65 72 20 74 61 | 62 6c 65 2c 20 74 68 65 |nster ta|ble, the|
|00001f60| 6e 20 74 68 65 20 74 65 | 72 72 61 69 6e 20 6f 6e |n the te|rrain on|
|00001f70| 65 2c 20 74 68 65 6e 20 | 74 68 65 20 62 6f 6f 74 |e, then |the boot|
|00001f80| 79 2e 20 49 6e 20 0a 58 | 74 68 69 73 20 77 61 79 |y. In .X|this way|
|00001f90| 2c 20 79 6f 75 20 77 6f | 75 6c 64 20 73 74 69 6c |, you wo|uld stil|
|00001fa0| 6c 20 68 61 76 65 20 61 | 20 70 65 72 66 65 63 74 |l have a| perfect|
|00001fb0| 6c 79 20 75 73 61 62 6c | 65 20 73 65 74 20 6f 66 |ly usabl|e set of|
|00001fc0| 20 74 61 62 6c 65 73 20 | 66 6f 72 0a 58 61 6e 79 | tables |for.Xany|
|00001fd0| 20 74 69 6d 65 20 79 6f | 75 20 77 61 6e 74 65 64 | time yo|u wanted|
|00001fe0| 20 6a 75 73 74 20 61 20 | 6d 6f 6e 73 74 65 72 2c | just a |monster,|
|00001ff0| 20 6f 72 20 6a 75 73 74 | 20 74 65 72 72 61 69 6e | or just| terrain|
|00002000| 2e 20 54 68 65 20 70 6f | 73 73 69 62 69 6c 69 74 |. The po|ssibilit|
|00002010| 69 65 73 0a 58 61 73 20 | 66 61 72 20 61 73 20 6d |ies.Xas |far as m|
|00002020| 61 69 6e 74 61 69 6e 69 | 6e 67 20 73 74 61 6e 64 |aintaini|ng stand|
|00002030| 61 72 64 20 6c 69 62 72 | 61 72 69 65 73 20 61 72 |ard libr|aries ar|
|00002040| 65 20 63 6f 6e 73 69 64 | 65 72 61 62 6c 65 2c 20 |e consid|erable, |
|00002050| 6f 62 76 69 6f 75 73 6c | 79 2e 0a 58 54 68 65 20 |obviousl|y..XThe |
|00002060| 70 72 69 6d 61 72 79 20 | 6c 69 6d 69 74 61 74 69 |primary |limitati|
|00002070| 6f 6e 20 69 73 20 79 6f | 75 72 20 6d 61 63 68 69 |on is yo|ur machi|
|00002080| 6e 65 27 73 20 73 74 61 | 63 6b 20 61 6e 64 20 64 |ne's sta|ck and d|
|00002090| 69 73 6b 20 73 70 61 63 | 65 2e 0a 58 2e 62 70 0a |isk spac|e..X.bp.|
|000020a0| 58 2e 53 48 20 45 58 41 | 4d 50 4c 45 53 0a 58 0a |X.SH EXA|MPLES.X.|
|000020b0| 58 24 20 5c 66 42 72 6e | 64 20 50 69 72 61 74 65 |X$ \fBrn|d Pirate|
|000020c0| 73 5c 66 52 0a 58 0a 58 | 2e 49 20 72 6e 64 20 0a |s\fR.X.X|.I rnd .|
|000020d0| 58 77 69 6c 6c 20 72 65 | 61 64 20 74 68 65 20 74 |Xwill re|ad the t|
|000020e0| 61 62 6c 65 20 6e 61 6d | 65 64 0a 58 2e 42 20 50 |able nam|ed.X.B P|
|000020f0| 69 72 61 74 65 73 0a 58 | 61 6e 64 20 65 78 65 63 |irates.X|and exec|
|00002100| 75 74 65 73 20 61 6c 6c | 20 74 68 65 20 73 74 61 |utes all| the sta|
|00002110| 74 73 2c 20 73 75 62 74 | 61 62 6c 65 73 2c 20 61 |ts, subt|ables, a|
|00002120| 6e 64 20 74 61 62 6c 65 | 73 20 63 6f 6e 74 61 69 |nd table|s contai|
|00002130| 6e 65 64 20 74 68 65 72 | 65 69 6e 2e 0a 58 0a 58 |ned ther|ein..X.X|
|00002140| 5c 66 42 28 54 68 65 20 | 63 6f 6e 74 65 6e 74 73 |\fB(The |contents|
|00002150| 20 6f 66 20 66 69 6c 65 | 20 22 50 69 72 61 74 65 | of file| "Pirate|
|00002160| 73 22 2e 29 5c 66 52 0a | 58 2e 6e 66 0a 58 0a 58 |s".)\fR.|X.nf.X.X|
|00002170| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002180| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002190| 2d 2d 2d 2d 2d 2d 0a 58 | 41 20 73 61 6d 70 6c 65 |------.X|A sample|
|000021a0| 20 70 69 72 61 74 65 20 | 2d 2d 2d 2d 2d 0a 58 73 | pirate |-----.Xs|
|000021b0| 74 61 74 20 73 74 72 65 | 6e 67 74 68 20 33 20 36 |tat stre|ngth 3 6|
|000021c0| 0a 58 5c 5c 74 0a 58 73 | 74 61 74 20 62 72 61 69 |.X\\t.Xs|tat brai|
|000021d0| 6e 73 20 33 20 36 0a 58 | 0a 58 70 6f 73 73 65 73 |ns 3 6.X|.Xposses|
|000021e0| 69 6f 6e 73 3a 0a 58 73 | 75 62 74 61 62 6c 65 20 |ions:.Xs|ubtable |
|000021f0| 70 6f 73 73 65 73 69 6f | 6e 73 20 31 20 31 30 30 |possesio|ns 1 100|
|00002200| 0a 58 0a 58 74 61 62 6c | 65 20 41 6e 6f 74 68 65 |.X.Xtabl|e Anothe|
|00002210| 72 74 61 62 6c 65 20 30 | 20 30 0a 58 0a 58 2d 2d |rtable 0| 0.X.X--|
|00002220| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002230| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002240| 2d 2d 2d 2d 2d 0a 58 5c | 5c 6c 0a 58 0a 58 2e 66 |-----.X\|\l.X.X.f|
|00002250| 69 0a 58 2e 61 64 0a 58 | 54 68 69 73 20 77 6f 75 |i.X.ad.X|This wou|
|00002260| 6c 64 20 67 65 6e 65 72 | 61 74 65 20 61 20 70 69 |ld gener|ate a pi|
|00002270| 72 61 74 65 20 77 69 74 | 68 20 33 64 36 20 73 74 |rate wit|h 3d6 st|
|00002280| 72 65 6e 67 74 68 20 61 | 6e 64 20 62 72 61 69 6e |rength a|nd brain|
|00002290| 73 2c 20 61 6e 64 0a 58 | 77 6f 75 6c 64 20 6d 61 |s, and.X|would ma|
|000022a0| 6b 65 20 61 20 31 64 31 | 30 30 20 72 6f 6c 6c 20 |ke a 1d1|00 roll |
|000022b0| 6f 6e 20 74 68 65 20 70 | 6f 73 73 65 73 73 69 6f |on the p|ossessio|
|000022c0| 6e 73 20 74 61 62 6c 65 | 2e 20 0a 58 54 68 65 20 |ns table|. .XThe |
|000022d0| 74 61 62 6c 65 20 22 41 | 6e 6f 74 68 65 72 74 61 |table "A|notherta|
|000022e0| 62 6c 65 22 20 69 73 20 | 74 68 65 6e 20 6f 70 65 |ble" is |then ope|
|000022f0| 6e 65 64 20 61 6e 64 20 | 74 72 65 61 74 65 64 20 |ned and |treated |
|00002300| 61 73 20 61 20 6e 65 77 | 20 6c 69 73 74 20 6f 66 |as a new| list of|
|00002310| 0a 58 63 6f 6d 6d 61 6e | 64 73 2e 20 4e 6f 74 65 |.Xcomman|ds. Note|
|00002320| 20 74 68 61 74 20 74 68 | 65 72 65 20 61 72 65 20 | that th|ere are |
|00002330| 32 20 6e 75 6d 62 65 72 | 73 20 70 72 6f 76 69 64 |2 number|s provid|
|00002340| 65 64 20 77 69 74 68 20 | 74 68 65 20 74 61 62 6c |ed with |the tabl|
|00002350| 65 20 63 6f 6d 6d 61 6e | 64 2e 0a 58 54 68 69 73 |e comman|d..XThis|
|00002360| 20 69 73 20 4d 41 4e 44 | 41 54 4f 52 59 2c 20 61 | is MAND|ATORY, a|
|00002370| 6e 64 20 64 75 65 20 6f | 6e 6c 79 20 74 6f 20 6c |nd due o|nly to l|
|00002380| 61 7a 79 20 70 72 6f 67 | 72 61 6d 6d 69 6e 67 2e |azy prog|ramming.|
|00002390| 20 4c 69 76 65 20 77 69 | 74 68 20 69 74 2e 0a 58 | Live wi|th it..X|
|000023a0| 41 70 70 72 6f 70 72 69 | 61 74 65 20 74 61 62 73 |Appropri|ate tabs|
|000023b0| 20 61 6e 64 0a 58 61 20 | 66 6f 72 6d 66 65 65 64 | and.Xa |formfeed|
|000023c0| 20 61 72 65 20 67 65 6e | 65 72 61 74 65 64 2e 20 | are gen|erated. |
|000023d0| 0a 58 0a 58 5c 66 42 28 | 63 6f 6e 74 65 6e 74 73 |.X.X\fB(|contents|
|000023e0| 20 6f 66 20 66 69 6c 65 | 20 22 70 6f 73 73 65 73 | of file| "posses|
|000023f0| 69 6f 6e 73 22 29 5c 66 | 50 0a 58 0a 58 2e 6e 66 |ions")\f|P.X.X.nf|
|00002400| 0a 58 31 30 20 43 75 74 | 6c 61 73 73 0a 58 32 30 |.X10 Cut|lass.X20|
|00002410| 20 46 69 73 74 73 0a 58 | 33 30 20 73 75 62 74 61 | Fists.X|30 subta|
|00002420| 62 6c 65 20 62 65 76 65 | 72 61 67 65 20 31 20 31 |ble beve|rage 1 1|
|00002430| 30 30 0a 58 34 30 20 42 | 65 6c 61 79 69 6e 67 20 |00.X40 B|elaying |
|00002440| 50 69 6e 0a 58 39 30 20 | 4a 75 73 74 20 68 69 73 |Pin.X90 |Just his|
|00002450| 20 63 6c 6f 74 68 65 73 | 0a 58 31 30 30 20 74 61 | clothes|.X100 ta|
|00002460| 62 6c 65 20 61 72 6d 6f | 72 20 30 20 30 0a 58 0a |ble armo|r 0 0.X.|
|00002470| 58 2e 66 69 0a 58 49 6e | 20 74 68 69 73 20 65 78 |X.fi.XIn| this ex|
|00002480| 61 6d 70 6c 65 2c 20 77 | 68 65 6e 20 74 68 65 20 |ample, w|hen the |
|00002490| 73 75 62 74 61 62 6c 65 | 20 77 61 73 20 63 61 6c |subtable| was cal|
|000024a0| 6c 65 64 2c 20 61 20 31 | 64 31 30 30 20 77 61 73 |led, a 1|d100 was|
|000024b0| 20 72 6f 6c 6c 65 64 20 | 28 62 65 0a 58 73 75 72 | rolled |(be.Xsur|
|000024c0| 65 20 74 6f 20 73 70 65 | 63 69 66 79 20 74 68 61 |e to spe|cify tha|
|000024d0| 74 20 72 69 67 68 74 21 | 29 20 30 2d 31 30 20 79 |t right!|) 0-10 y|
|000024e0| 69 65 6c 64 73 20 61 20 | 43 75 74 6c 61 73 73 2c |ields a |Cutlass,|
|000024f0| 20 31 31 2d 32 30 20 46 | 69 73 74 73 2c 20 65 74 | 11-20 F|ists, et|
|00002500| 63 2e 0a 58 32 30 2d 33 | 30 20 77 69 6c 6c 20 72 |c..X20-3|0 will r|
|00002510| 6f 6c 6c 20 6f 6e 20 74 | 68 65 20 73 75 62 74 61 |oll on t|he subta|
|00002520| 62 6c 65 20 27 62 65 76 | 65 72 61 67 65 27 20 66 |ble 'bev|erage' f|
|00002530| 6f 72 20 61 20 73 75 69 | 74 61 62 6c 65 20 6c 69 |or a sui|table li|
|00002540| 71 75 69 64 20 72 65 66 | 72 65 73 68 6d 65 6e 74 |quid ref|reshment|
|00002550| 2c 0a 58 41 6e 64 20 39 | 31 2d 31 30 30 20 77 69 |,.XAnd 9|1-100 wi|
|00002560| 6c 6c 20 72 65 63 75 72 | 73 65 20 69 6e 74 6f 20 |ll recur|se into |
|00002570| 74 68 65 20 74 61 62 6c | 65 20 27 61 72 6d 6f 72 |the tabl|e 'armor|
|00002580| 27 20 61 6e 64 20 70 72 | 69 6e 74 20 6f 75 74 20 |' and pr|int out |
|00002590| 77 68 61 74 20 74 79 70 | 65 73 0a 58 6f 66 20 61 |what typ|es.Xof a|
|000025a0| 72 6d 6f 72 20 74 68 65 | 20 70 69 72 61 74 65 20 |rmor the| pirate |
|000025b0| 68 61 73 2e 0a 58 2e 53 | 48 20 43 41 56 45 41 54 |has..X.S|H CAVEAT|
|000025c0| 53 0a 58 2e 54 50 20 32 | 0a 58 5c 28 62 75 0a 58 |S.X.TP 2|.X\(bu.X|
|000025d0| 54 68 69 73 20 70 72 6f | 67 72 61 6d 20 69 73 20 |This pro|gram is |
|000025e0| 6d 61 63 68 69 6e 65 20 | 64 65 70 65 6e 64 65 6e |machine |dependen|
|000025f0| 74 20 74 6f 20 74 68 65 | 20 64 65 67 72 65 65 20 |t to the| degree |
|00002600| 74 68 61 74 20 79 6f 75 | 72 20 6d 61 63 68 69 6e |that you|r machin|
|00002610| 65 20 6c 69 6b 65 73 0a | 58 72 65 63 75 72 73 69 |e likes.|Xrecursi|
|00002620| 6f 6e 2e 0a 58 2e 54 50 | 0a 58 5c 28 62 75 0a 58 |on..X.TP|.X\(bu.X|
|00002630| 54 68 69 73 20 70 72 6f | 67 72 61 6d 20 68 61 73 |This pro|gram has|
|00002640| 20 72 75 6e 20 6f 6e 20 | 47 6f 75 6c 64 20 50 6f | run on |Gould Po|
|00002650| 77 65 72 6e 6f 64 65 20 | 39 30 38 30 2c 20 53 75 |wernode |9080, Su|
|00002660| 6e 20 77 6f 72 6b 73 74 | 61 74 69 6f 6e 73 2c 20 |n workst|ations, |
|00002670| 61 6e 64 0a 58 6d 79 20 | 49 42 4d 20 63 6f 6d 70 |and.Xmy |IBM comp|
|00002680| 61 74 69 62 6c 65 20 63 | 6c 6f 6e 65 20 28 6c 61 |atible c|lone (la|
|00002690| 74 74 69 63 65 20 33 2e | 30 29 2e 20 4f 6e 20 74 |ttice 3.|0). On t|
|000026a0| 68 65 20 50 43 73 2c 20 | 75 73 75 61 6c 6c 79 20 |he PCs, |usually |
|000026b0| 73 6f 6d 65 20 70 72 6f | 76 69 73 69 6f 6e 0a 58 |some pro|vision.X|
|000026c0| 77 69 6c 6c 20 68 61 76 | 65 20 74 6f 20 62 65 20 |will hav|e to be |
|000026d0| 6d 61 64 65 20 74 6f 20 | 69 6e 63 72 65 61 73 65 |made to |increase|
|000026e0| 20 74 68 65 20 73 74 61 | 63 6b 20 73 69 7a 65 2e | the sta|ck size.|
|000026f0| 20 4f 6e 20 6c 61 74 74 | 69 63 65 20 74 68 69 73 | On latt|ice this|
|00002700| 20 69 73 0a 58 64 6f 6e | 65 20 62 79 20 64 65 63 | is.Xdon|e by dec|
|00002710| 6c 61 72 69 6e 67 20 61 | 20 67 6c 6f 62 61 6c 20 |laring a| global |
|00002720| 22 69 6e 74 20 5f 73 74 | 61 63 6b 20 3d 20 36 30 |"int _st|ack = 60|
|00002730| 30 30 3b 22 20 6f 72 20 | 61 62 6f 75 74 20 36 20 |00;" or |about 6 |
|00002740| 6b 69 6c 6f 62 79 74 65 | 73 2e 0a 58 59 6f 75 20 |kilobyte|s..XYou |
|00002750| 64 65 63 69 64 65 2e 20 | 4e 6f 20 67 75 61 72 61 |decide. |No guara|
|00002760| 6e 74 65 65 73 20 61 72 | 65 20 6d 61 64 65 20 66 |ntees ar|e made f|
|00002770| 6f 72 20 6f 74 68 65 72 | 20 63 6f 6d 70 69 6c 65 |or other| compile|
|00002780| 72 73 2f 6d 61 63 68 69 | 6e 65 73 2c 20 62 75 74 |rs/machi|nes, but|
|00002790| 0a 58 61 6e 79 74 68 69 | 6e 67 20 74 68 61 74 20 |.Xanythi|ng that |
|000027a0| 69 73 20 6e 6f 74 20 62 | 72 61 69 6e 64 65 61 64 |is not b|raindead|
|000027b0| 20 63 61 6e 20 68 61 6e | 64 6c 65 20 69 74 2e 20 | can han|dle it. |
|000027c0| 0a 58 2e 54 50 0a 58 5c | 28 62 75 0a 58 43 61 70 |.X.TP.X\|(bu.XCap|
|000027d0| 74 75 72 69 6e 67 20 74 | 68 65 20 6f 75 74 70 75 |turing t|he outpu|
|000027e0| 74 3a 20 54 68 69 73 20 | 70 72 6f 67 72 61 6d 20 |t: This |program |
|000027f0| 69 73 20 64 65 73 69 67 | 6e 65 64 20 66 6f 72 20 |is desig|ned for |
|00002800| 73 79 73 74 65 6d 73 20 | 77 69 74 68 20 49 2f 4f |systems |with I/O|
|00002810| 0a 58 72 65 64 69 72 65 | 63 74 69 6f 6e 2e 20 49 |.Xredire|ction. I|
|00002820| 66 20 79 6f 75 20 64 6f | 6e 27 74 20 68 61 76 65 |f you do|n't have|
|00002830| 20 69 74 2c 20 49 20 73 | 75 67 67 65 73 74 20 79 | it, I s|uggest y|
|00002840| 6f 75 20 66 72 6f 62 20 | 74 68 65 20 63 6f 64 65 |ou frob |the code|
|00002850| 20 73 6c 69 67 68 74 6c | 79 0a 58 62 79 20 63 68 | slightl|y.Xby ch|
|00002860| 61 6e 67 69 6e 67 20 61 | 6c 6c 20 70 72 69 6e 74 |anging a|ll print|
|00002870| 66 73 20 74 6f 20 66 70 | 72 69 6e 74 66 2c 20 65 |fs to fp|rintf, e|
|00002880| 74 63 2e 20 46 6f 72 20 | 79 6f 75 20 77 69 74 68 |tc. For |you with|
|00002890| 20 49 2f 4f 20 72 65 64 | 69 72 65 63 74 69 6f 6e | I/O red|irection|
|000028a0| 2c 0a 58 74 68 65 20 69 | 6e 69 74 69 61 6c 20 74 |,.Xthe i|nitial t|
|000028b0| 65 78 74 2c 20 65 74 63 | 2c 20 69 73 20 72 65 74 |ext, etc|, is ret|
|000028c0| 75 72 6e 65 64 20 6f 6e | 20 74 68 65 20 73 74 61 |urned on| the sta|
|000028d0| 6e 64 61 72 64 20 65 72 | 72 6f 72 2c 20 73 6f 20 |ndard er|ror, so |
|000028e0| 69 74 20 77 69 6c 6c 0a | 58 6e 6f 74 20 6b 6c 75 |it will.|Xnot klu|
|000028f0| 67 65 20 75 70 20 79 6f | 75 72 20 63 68 61 72 61 |ge up yo|ur chara|
|00002900| 63 74 65 72 73 20 61 73 | 20 74 68 65 79 20 61 72 |cters as| they ar|
|00002910| 65 20 67 65 6e 65 72 61 | 74 65 64 2e 20 50 69 70 |e genera|ted. Pip|
|00002920| 65 20 74 68 65 20 6f 75 | 74 70 75 74 0a 58 74 68 |e the ou|tput.Xth|
|00002930| 72 6f 75 67 68 20 79 6f | 75 72 20 66 61 76 6f 72 |rough yo|ur favor|
|00002940| 69 74 65 20 66 6f 72 6d | 61 74 74 65 72 2c 20 65 |ite form|atter, e|
|00002950| 64 69 74 6f 72 2c 20 70 | 72 69 6e 74 65 72 2c 20 |ditor, p|rinter, |
|00002960| 6f 72 20 6e 75 6c 6c 20 | 64 65 76 69 63 65 2e 0a |or null |device..|
|00002970| 58 2e 53 48 20 41 55 54 | 48 4f 52 0a 58 2e 6e 66 |X.SH AUT|HOR.X.nf|
|00002980| 0a 58 20 20 20 20 20 20 | 4d 61 72 63 75 73 20 4a |.X |Marcus J|
|00002990| 20 52 61 6e 75 6d 2c 20 | 47 6f 75 6c 64 20 49 6e | Ranum, |Gould In|
|000029a0| 63 2e 0a 58 20 20 20 20 | 20 20 41 6c 6c 20 72 69 |c..X | All ri|
|000029b0| 67 68 74 73 20 72 65 73 | 65 72 76 65 64 2e 0a 58 |ghts res|erved..X|
|000029c0| 2e 66 69 0a 58 0a 58 44 | 6f 6e 27 74 20 75 73 65 |.fi.X.XD|on't use|
|000029d0| 20 74 68 69 73 20 74 6f | 20 6d 61 6b 65 20 6d 6f | this to| make mo|
|000029e0| 6e 65 79 2c 20 6f 72 20 | 73 65 6c 6c 2e 20 4f 74 |ney, or |sell. Ot|
|000029f0| 68 65 72 77 69 73 65 20 | 69 74 20 6d 61 79 20 62 |herwise |it may b|
|00002a00| 65 20 66 72 65 65 6c 79 | 20 63 6f 70 69 65 64 2c |e freely| copied,|
|00002a10| 0a 58 64 65 6c 65 74 65 | 64 2c 20 61 6e 64 20 68 |.Xdelete|d, and h|
|00002a20| 61 63 6b 65 64 2e 0a 58 | 47 69 76 65 20 6d 65 20 |acked..X|Give me |
|00002a30| 63 72 65 64 69 74 20 66 | 6f 72 20 74 68 65 20 69 |credit f|or the i|
|00002a40| 64 65 61 2c 20 69 66 20 | 6e 6f 74 20 74 68 65 20 |dea, if |not the |
|00002a50| 63 6f 64 65 2e 0a 45 4e | 44 5f 4f 46 5f 72 6e 64 |code..EN|D_OF_rnd|
|00002a60| 2e 36 0a 69 66 20 74 65 | 73 74 20 36 34 32 35 20 |.6.if te|st 6425 |
|00002a70| 2d 6e 65 20 60 77 63 20 | 2d 63 20 3c 72 6e 64 2e |-ne `wc |-c <rnd.|
|00002a80| 36 60 3b 20 74 68 65 6e | 0a 20 20 20 20 65 63 68 |6`; then|. ech|
|00002a90| 6f 20 73 68 61 72 3a 20 | 5c 22 72 6e 64 2e 36 5c |o shar: |\"rnd.6\|
|00002aa0| 22 20 75 6e 70 61 63 6b | 65 64 20 77 69 74 68 20 |" unpack|ed with |
|00002ab0| 77 72 6f 6e 67 20 73 69 | 7a 65 21 0a 66 69 0a 23 |wrong si|ze!.fi.#|
|00002ac0| 20 65 6e 64 20 6f 66 20 | 6f 76 65 72 77 72 69 74 | end of |overwrit|
|00002ad0| 69 6e 67 20 63 68 65 63 | 6b 0a 66 69 0a 69 66 20 |ing chec|k.fi.if |
|00002ae0| 74 65 73 74 20 2d 66 20 | 72 6e 64 2e 63 20 2d 61 |test -f |rnd.c -a|
|00002af0| 20 22 24 7b 31 7d 22 20 | 21 3d 20 22 2d 63 22 20 | "${1}" |!= "-c" |
|00002b00| 3b 20 74 68 65 6e 20 0a | 20 20 65 63 68 6f 20 73 |; then .| echo s|
|00002b10| 68 61 72 3a 20 57 69 6c | 6c 20 6e 6f 74 20 6f 76 |har: Wil|l not ov|
|00002b20| 65 72 2d 77 72 69 74 65 | 20 65 78 69 73 74 69 6e |er-write| existin|
|00002b30| 67 20 66 69 6c 65 20 5c | 22 72 6e 64 2e 63 5c 22 |g file \|"rnd.c\"|
|00002b40| 0a 65 6c 73 65 0a 65 63 | 68 6f 20 73 68 61 72 3a |.else.ec|ho shar:|
|00002b50| 20 45 78 74 72 61 63 74 | 69 6e 67 20 5c 22 72 6e | Extract|ing \"rn|
|00002b60| 64 2e 63 5c 22 20 5c 28 | 34 39 33 30 20 63 68 61 |d.c\" \(|4930 cha|
|00002b70| 72 61 63 74 65 72 73 5c | 29 0a 73 65 64 20 22 73 |racters\|).sed "s|
|00002b80| 2f 5e 58 2f 2f 22 20 3e | 72 6e 64 2e 63 20 3c 3c |/^X//" >|rnd.c <<|
|00002b90| 27 45 4e 44 5f 4f 46 5f | 72 6e 64 2e 63 27 0a 58 |'END_OF_|rnd.c'.X|
|00002ba0| 23 69 6e 63 6c 75 64 65 | 20 22 73 74 64 69 6f 2e |#include| "stdio.|
|00002bb0| 68 22 0a 58 0a 58 2f 2a | 20 72 6e 64 2e 63 20 3a |h".X.X/*| rnd.c :|
|00002bc0| 0a 58 09 77 72 69 74 74 | 65 6e 20 62 79 20 4d 61 |.X.writt|en by Ma|
|00002bd0| 72 63 75 73 20 4a 20 52 | 61 6e 75 6d 2e 0a 58 09 |rcus J R|anum..X.|
|00002be0| 41 6c 6c 20 72 69 67 68 | 74 73 20 72 65 73 65 72 |All righ|ts reser|
|00002bf0| 76 65 64 2e 20 59 6f 75 | 20 6d 61 79 20 66 72 65 |ved. You| may fre|
|00002c00| 65 6c 79 20 63 6f 70 79 | 2c 20 6d 6f 64 69 66 79 |ely copy|, modify|
|00002c10| 2c 20 64 69 73 74 72 69 | 62 75 74 65 2c 0a 58 09 |, distri|bute,.X.|
|00002c20| 61 6e 64 20 64 65 6c 65 | 74 65 20 74 68 69 73 20 |and dele|te this |
|00002c30| 70 72 6f 67 72 61 6d 2c | 20 62 75 74 20 61 6e 79 |program,| but any|
|00002c40| 20 75 73 65 20 74 68 61 | 74 20 77 69 6c 6c 20 63 | use tha|t will c|
|00002c50| 61 75 73 65 20 79 6f 75 | 20 74 6f 20 0a 58 09 67 |ause you| to .X.g|
|00002c60| 61 69 6e 20 6d 6f 6e 65 | 79 20 69 73 20 70 72 6f |ain mone|y is pro|
|00002c70| 68 69 62 69 74 65 64 20 | 75 6e 6c 65 73 73 20 77 |hibited |unless w|
|00002c80| 65 20 77 6f 72 6b 20 6f | 75 74 20 61 20 64 65 61 |e work o|ut a dea|
|00002c90| 6c 2c 20 6f 72 20 79 6f | 75 0a 58 09 61 73 6b 20 |l, or yo|u.X.ask |
|00002ca0| 6d 65 20 6e 69 63 65 6c | 79 2e 20 41 6e 79 20 6e |me nicel|y. Any n|
|00002cb0| 69 66 74 79 20 69 64 65 | 61 73 2f 6d 6f 64 69 66 |ifty ide|as/modif|
|00002cc0| 69 63 61 74 69 6f 6e 73 | 2c 20 70 6c 65 61 73 65 |ications|, please|
|00002cd0| 20 6c 65 74 20 6d 65 0a | 58 09 6b 6e 6f 77 2e 0a | let me.|X.know..|
|00002ce0| 58 09 09 2d 6d 6a 72 0a | 58 0a 58 09 4e 65 77 20 |X..-mjr.|X.X.New |
|00002cf0| 46 65 61 74 75 72 65 73 | 20 61 64 64 65 64 20 62 |Features| added b|
|00002d00| 79 3a 20 20 44 61 6c 65 | 20 53 61 6c 79 65 72 0a |y: Dale| Salyer.|
|00002d10| 58 09 20 20 20 20 20 20 | 20 45 2d 4d 61 69 6c 20 |X. | E-Mail |
|00002d20| 41 64 64 72 65 73 73 3a | 09 69 68 6e 70 34 21 64 |Address:|.ihnp4!d|
|00002d30| 72 75 68 69 21 64 65 73 | 0a 58 0a 58 09 43 48 47 |ruhi!des|.X.X.CHG|
|00002d40| 31 29 20 44 65 66 61 75 | 6c 74 20 6f 66 20 23 20 |1) Defau|lt of # |
|00002d50| 6f 66 20 69 74 65 72 61 | 74 69 6f 6e 73 2e 0a 58 |of itera|tions..X|
|00002d60| 09 43 48 47 32 29 20 52 | 6f 6c 6c 69 6e 67 20 6f |.CHG2) R|olling o|
|00002d70| 66 20 64 69 63 65 20 74 | 61 6b 65 73 20 62 65 73 |f dice t|akes bes|
|00002d80| 74 20 6f 66 20 33 20 74 | 72 69 65 73 2e 0a 58 09 |t of 3 t|ries..X.|
|00002d90| 43 48 47 33 29 20 4e 65 | 73 74 69 6e 67 20 6f 66 |CHG3) Ne|sting of|
|00002da0| 20 73 75 62 74 61 62 6c | 65 73 2e 0a 58 09 43 48 | subtabl|es..X.CH|
|00002db0| 47 34 29 20 41 6c 74 65 | 72 6e 61 74 65 20 66 6f |G4) Alte|rnate fo|
|00002dc0| 72 6d 61 74 20 6f 66 20 | 73 74 61 74 20 63 6f 6d |rmat of |stat com|
|00002dd0| 6d 61 6e 64 2e 0a 58 0a | 58 2a 2f 0a 58 0a 58 6d |mand..X.|X*/.X.Xm|
|00002de0| 61 69 6e 28 61 72 67 63 | 2c 61 72 67 76 29 0a 58 |ain(argc|,argv).X|
|00002df0| 69 6e 74 20 61 72 67 63 | 3b 0a 58 63 68 61 72 20 |int argc|;.Xchar |
|00002e00| 2a 61 72 67 76 5b 5d 3b | 0a 58 7b 0a 58 09 69 6e |*argv[];|.X{.X.in|
|00002e10| 74 20 61 3b 0a 58 09 63 | 68 61 72 20 73 65 65 64 |t a;.X.c|har seed|
|00002e20| 5b 31 30 30 5d 3b 0a 58 | 09 63 68 61 72 20 77 6f |[100];.X|.char wo|
|00002e30| 72 64 5b 32 30 30 5d 3b | 0a 58 09 69 6e 74 09 69 |rd[200];|.X.int.i|
|00002e40| 74 65 72 61 74 69 6f 6e | 73 3b 0a 58 0a 58 09 2f |teration|s;.X.X./|
|00002e50| 2a 20 49 66 20 79 6f 75 | 20 63 61 6e 27 74 20 64 |* If you| can't d|
|00002e60| 6f 20 74 68 69 73 2c 20 | 63 68 61 6e 67 65 20 62 |o this, |change b|
|00002e70| 61 63 6b 20 74 6f 20 6f | 6c 64 20 77 61 79 20 2a |ack to o|ld way *|
|00002e80| 2f 0a 58 09 6c 6f 6e 67 | 20 74 3b 0a 58 09 74 69 |/.X.long| t;.X.ti|
|00002e90| 6d 65 28 26 74 29 3b 0a | 58 09 73 72 61 6e 64 28 |me(&t);.|X.srand(|
|00002ea0| 67 65 74 70 69 64 28 29 | 20 2b 20 28 69 6e 74 29 |getpid()| + (int)|
|00002eb0| 28 28 74 3e 3e 31 36 29 | 20 2b 20 74 29 29 3b 0a |((t>>16)| + t));.|
|00002ec0| 58 0a 58 09 2f 2a 20 43 | 48 47 31 29 20 44 65 66 |X.X./* C|HG1) Def|
|00002ed0| 61 75 6c 74 20 69 73 20 | 31 30 20 69 74 65 72 61 |ault is |10 itera|
|00002ee0| 74 69 6f 6e 73 20 69 66 | 20 43 2f 52 20 70 72 65 |tions if| C/R pre|
|00002ef0| 73 73 65 64 20 2a 2f 0a | 58 0a 58 09 66 70 72 69 |ssed */.|X.X.fpri|
|00002f00| 6e 74 66 28 73 74 64 65 | 72 72 2c 22 48 6f 77 20 |ntf(stde|rr,"How |
|00002f10| 6d 61 6e 79 20 72 75 6e | 73 20 64 6f 20 79 6f 75 |many run|s do you|
|00002f20| 20 77 61 6e 74 5b 31 30 | 5d 3f 22 29 3b 0a 58 09 | want[10|]?");.X.|
|00002f30| 69 74 65 72 61 74 69 6f | 6e 73 3d 61 74 6f 69 28 |iteratio|ns=atoi(|
|00002f40| 67 65 74 73 28 77 6f 72 | 64 29 29 3b 0a 58 09 69 |gets(wor|d));.X.i|
|00002f50| 66 28 20 69 74 65 72 61 | 74 69 6f 6e 73 20 3d 3d |f( itera|tions ==|
|00002f60| 20 30 20 29 20 69 74 65 | 72 61 74 69 6f 6e 73 20 | 0 ) ite|rations |
|00002f70| 3d 20 31 30 3b 0a 58 0a | 58 09 77 68 69 6c 65 28 |= 10;.X.|X.while(|
|00002f80| 69 74 65 72 61 74 69 6f | 6e 73 2d 2d 29 20 7b 0a |iteratio|ns--) {.|
|00002f90| 58 09 09 66 6f 72 28 61 | 3d 31 20 3b 20 61 20 3c |X..for(a|=1 ; a <|
|00002fa0| 20 61 72 67 63 3b 20 61 | 2b 2b 29 20 7b 0a 58 09 | argc; a|++) {.X.|
|00002fb0| 09 09 64 6f 74 61 62 6c | 65 28 61 72 67 76 5b 61 |..dotabl|e(argv[a|
|00002fc0| 5d 29 3b 0a 58 09 09 7d | 0a 58 09 7d 0a 58 7d 0a |]);.X..}|.X.}.X}.|
|00002fd0| 58 0a 58 2f 2a 20 72 6f | 6c 6c 20 61 20 3c 73 69 |X.X/* ro|ll a <si|
|00002fe0| 64 65 73 3e 20 73 69 64 | 65 64 20 64 69 65 20 3c |des> sid|ed die <|
|00002ff0| 6e 75 6d 3e 20 74 69 6d | 65 73 20 5b 62 65 73 74 |num> tim|es [best|
|00003000| 20 6f 66 20 74 68 72 65 | 65 20 74 72 69 65 73 5d | of thre|e tries]|
|00003010| 20 2a 2f 0a 58 0a 58 72 | 6f 6c 6c 28 6e 75 6d 2c | */.X.Xr|oll(num,|
|00003020| 73 69 64 65 73 29 0a 58 | 69 6e 74 20 6e 75 6d 3b |sides).X|int num;|
|00003030| 0a 58 69 6e 74 20 73 69 | 64 65 73 3b 0a 58 7b 0a |.Xint si|des;.X{.|
|00003040| 58 09 69 6e 74 20 61 3d | 30 2c 20 6d 3d 30 3b 0a |X.int a=|0, m=0;.|
|00003050| 58 09 69 6e 74 20 69 2c | 20 6a 3b 0a 58 09 66 6f |X.int i,| j;.X.fo|
|00003060| 72 28 69 3d 31 2c 6a 3d | 6e 75 6d 3b 69 3c 3d 33 |r(i=1,j=|num;i<=3|
|00003070| 3b 69 2b 2b 29 20 7b 0a | 58 09 20 20 20 20 77 68 |;i++) {.|X. wh|
|00003080| 69 6c 65 20 28 6a 2d 2d | 20 3e 30 29 0a 58 09 09 |ile (j--| >0).X..|
|00003090| 61 20 2b 3d 20 72 6e 64 | 28 73 69 64 65 73 29 3b |a += rnd|(sides);|
|000030a0| 0a 58 09 2f 2a 20 43 48 | 47 32 29 20 52 6f 6c 6c |.X./* CH|G2) Roll|
|000030b0| 69 6e 67 20 6f 66 20 64 | 69 63 65 20 74 61 6b 65 |ing of d|ice take|
|000030c0| 73 20 62 65 73 74 20 6f | 66 20 33 20 74 72 69 65 |s best o|f 3 trie|
|000030d0| 73 2e 20 2a 2f 0a 58 09 | 20 20 20 20 69 66 28 61 |s. */.X.| if(a|
|000030e0| 20 3e 20 6d 29 20 6d 20 | 3d 20 61 3b 0a 58 09 7d | > m) m |= a;.X.}|
|000030f0| 0a 58 09 72 65 74 75 72 | 6e 28 6d 29 3b 0a 58 7d |.X.retur|n(m);.X}|
|00003100| 0a 58 0a 58 2f 2a 20 72 | 6f 6c 6c 20 61 20 3c 64 |.X.X/* r|oll a <d|
|00003110| 69 65 3e 20 73 69 64 65 | 64 20 64 69 65 20 6f 6e |ie> side|d die on|
|00003120| 63 65 20 2a 2f 0a 58 0a | 58 72 6e 64 28 64 69 65 |ce */.X.|Xrnd(die|
|00003130| 29 0a 58 72 65 67 69 73 | 74 65 72 20 64 69 65 3b |).Xregis|ter die;|
|00003140| 0a 58 7b 0a 58 09 72 65 | 74 75 72 6e 28 28 28 72 |.X{.X.re|turn(((r|
|00003150| 61 6e 64 28 29 3e 3e 33 | 29 20 25 20 64 69 65 29 |and()>>3|) % die)|
|00003160| 2b 31 29 3b 0a 58 7d 0a | 58 0a 58 2f 2a 20 72 65 |+1);.X}.|X.X/* re|
|00003170| 61 64 73 20 61 20 74 61 | 62 6c 65 2e 20 63 61 6c |ads a ta|ble. cal|
|00003180| 6c 73 20 64 6f 70 61 72 | 73 65 20 66 6f 72 20 65 |ls dopar|se for e|
|00003190| 76 65 72 79 20 6c 69 6e | 65 20 69 6e 20 74 68 65 |very lin|e in the|
|000031a0| 20 74 61 62 6c 65 2e 0a | 58 09 6e 6f 74 65 2c 20 | table..|X.note, |
|000031b0| 69 66 20 64 6f 70 61 72 | 73 65 20 68 69 74 73 20 |if dopar|se hits |
|000031c0| 61 6e 6f 74 68 65 72 20 | 74 61 62 6c 65 20 6e 61 |another |table na|
|000031d0| 6d 65 2c 20 74 68 69 73 | 20 77 69 6c 6c 0a 58 09 |me, this| will.X.|
|000031e0| 62 65 20 72 65 63 75 72 | 73 69 76 65 6c 79 20 63 |be recur|sively c|
|000031f0| 61 6c 6c 65 64 2e 20 6d | 61 78 20 72 65 63 75 72 |alled. m|ax recur|
|00003200| 73 69 6f 6e 73 20 73 65 | 65 6d 73 20 74 6f 20 62 |sions se|ems to b|
|00003210| 65 0a 58 09 61 72 6f 75 | 6e 64 20 31 30 2e 2e 2e |e.X.arou|nd 10...|
|00003220| 2e 0a 58 2a 2f 0a 58 0a | 58 64 6f 74 61 62 6c 65 |..X*/.X.|Xdotable|
|00003230| 28 74 61 62 6c 65 29 0a | 58 63 68 61 72 20 74 61 |(table).|Xchar ta|
|00003240| 62 6c 65 5b 5d 3b 0a 58 | 7b 0a 58 09 46 49 4c 45 |ble[];.X|{.X.FILE|
|00003250| 20 2a 66 69 6c 65 3b 0a | 58 09 63 68 61 72 20 6a | *file;.|X.char j|
|00003260| 75 6e 6b 5b 42 55 46 53 | 49 5a 5d 3b 0a 58 0a 58 |unk[BUFS|IZ];.X.X|
|00003270| 09 69 66 28 28 66 69 6c | 65 20 3d 20 66 6f 70 65 |.if((fil|e = fope|
|00003280| 6e 28 74 61 62 6c 65 2c | 22 72 22 29 29 20 3d 3d |n(table,|"r")) ==|
|00003290| 4e 55 4c 4c 29 20 7b 0a | 58 09 09 66 70 72 69 6e |NULL) {.|X..fprin|
|000032a0| 74 66 28 73 74 64 65 72 | 72 2c 22 63 61 6e 27 74 |tf(stder|r,"can't|
|000032b0| 20 6f 70 65 6e 20 25 73 | 5c 6e 22 2c 74 61 62 6c | open %s|\n",tabl|
|000032c0| 65 29 3b 0a 58 09 09 65 | 78 69 74 28 31 29 3b 0a |e);.X..e|xit(1);.|
|000032d0| 58 09 7d 0a 58 0a 58 09 | 77 68 69 6c 65 28 28 66 |X.}.X.X.|while((f|
|000032e0| 67 65 74 73 28 6a 75 6e | 6b 2c 42 55 46 53 49 5a |gets(jun|k,BUFSIZ|
|000032f0| 2d 33 2c 66 69 6c 65 29 | 29 20 21 3d 4e 55 4c 4c |-3,file)|) !=NULL|
|00003300| 29 7b 0a 58 09 09 64 6f | 70 61 72 73 65 28 6a 75 |){.X..do|parse(ju|
|00003310| 6e 6b 29 3b 0a 58 09 7d | 0a 58 09 69 66 28 66 63 |nk);.X.}|.X.if(fc|
|00003320| 6c 6f 73 65 28 66 69 6c | 65 29 20 3d 3d 20 45 4f |lose(fil|e) == EO|
|00003330| 46 29 20 7b 0a 58 09 09 | 66 70 72 69 6e 74 66 28 |F) {.X..|fprintf(|
|00003340| 73 74 64 65 72 72 2c 22 | 75 6e 75 73 75 61 6c 20 |stderr,"|unusual |
|00003350| 66 69 6c 65 2d 63 6c 6f | 73 65 20 65 72 72 6f 72 |file-clo|se error|
|00003360| 21 5c 6e 22 29 3b 0a 58 | 09 09 65 78 69 74 28 31 |!\n");.X|..exit(1|
|00003370| 29 3b 0a 58 09 7d 0a 58 | 7d 0a 58 0a 58 2f 2a 20 |);.X.}.X|}.X.X/* |
|00003380| 72 65 61 64 73 20 61 20 | 73 75 62 74 61 62 6c 65 |reads a |subtable|
|00003390| 2c 20 61 6e 64 20 6c 6f | 6f 6b 73 20 66 6f 72 20 |, and lo|oks for |
|000033a0| 61 20 6e 75 6d 62 65 72 | 65 64 20 65 6e 74 72 79 |a number|ed entry|
|000033b0| 20 74 68 61 74 20 6d 61 | 74 63 68 65 73 20 74 68 | that ma|tches th|
|000033c0| 65 0a 58 09 67 69 76 65 | 6e 20 73 65 6c 65 63 74 |e.X.give|n select|
|000033d0| 69 6f 6e 20 63 72 69 74 | 65 72 69 6f 6e 2e 20 3c |ion crit|erion. <|
|000033e0| 73 74 61 74 3e 20 69 73 | 20 74 68 65 20 74 61 62 |stat> is| the tab|
|000033f0| 6c 65 20 6e 61 6d 65 2c | 20 3c 6e 75 6d 3e 20 69 |le name,| <num> i|
|00003400| 73 0a 58 09 74 68 65 20 | 6e 75 6d 62 65 72 20 6f |s.X.the |number o|
|00003410| 66 20 64 69 63 65 2c 20 | 61 6e 64 20 3c 64 69 65 |f dice, |and <die|
|00003420| 3e 20 69 73 20 74 68 65 | 20 6e 75 6d 62 65 72 20 |> is the| number |
|00003430| 6f 66 20 73 69 64 65 73 | 20 6f 6e 20 74 68 65 0a |of sides| on the.|
|00003440| 58 09 64 69 65 2e 20 74 | 68 65 20 73 75 62 74 61 |X.die. t|he subta|
|00003450| 62 6c 65 73 20 6d 75 73 | 74 20 62 65 20 69 6e 20 |bles mus|t be in |
|00003460| 74 68 65 20 66 6f 72 6d | 20 6f 66 20 0a 58 3c 23 |the form| of .X<#|
|00003470| 3e 20 74 65 78 74 20 65 | 6e 74 72 79 20 28 74 65 |> text e|ntry (te|
|00003480| 78 74 20 73 74 72 69 6e | 67 20 74 65 72 6d 69 6e |xt strin|g termin|
|00003490| 61 74 65 64 20 77 69 74 | 68 20 6e 65 77 6c 69 6e |ated wit|h newlin|
|000034a0| 65 29 0a 58 3c 23 3e 20 | 74 61 62 6c 65 20 65 6e |e).X<#> |table en|
|000034b0| 74 72 79 20 2e 2e 2e 0a | 58 3c 23 3e 20 73 75 62 |try ....|X<#> sub|
|000034c0| 74 61 62 6c 65 20 65 6e | 74 72 79 20 2e 2e 2e 0a |table en|try ....|
|000034d0| 58 3c 23 3e 20 73 74 61 | 74 20 65 6e 74 72 79 20 |X<#> sta|t entry |
|000034e0| 2e 2e 2e 0a 58 2a 2f 0a | 58 0a 58 64 6f 73 75 62 |....X*/.|X.Xdosub|
|000034f0| 74 61 62 6c 65 28 73 74 | 61 74 2c 6e 75 6d 2c 64 |table(st|at,num,d|
|00003500| 69 65 29 0a 58 63 68 61 | 72 20 73 74 61 74 5b 5d |ie).Xcha|r stat[]|
|00003510| 3b 0a 58 69 6e 74 09 6e | 75 6d 3b 0a 58 69 6e 74 |;.Xint.n|um;.Xint|
|00003520| 09 64 69 65 3b 0a 58 7b | 0a 58 0a 58 09 46 49 4c |.die;.X{|.X.X.FIL|
|00003530| 45 20 2a 74 62 6c 3b 0a | 58 0a 58 09 63 68 61 72 |E *tbl;.|X.X.char|
|00003540| 20 6a 75 6e 6b 5b 42 55 | 46 53 49 5a 5d 3b 0a 58 | junk[BU|FSIZ];.X|
|00003550| 09 63 68 61 72 20 77 6f | 72 64 5b 31 30 30 5d 3b |.char wo|rd[100];|
|00003560| 0a 58 09 69 6e 74 20 6f | 6c 64 3b 0a 58 09 69 6e |.X.int o|ld;.X.in|
|00003570| 74 20 6e 65 77 3b 0a 58 | 09 69 6e 74 20 70 69 63 |t new;.X|.int pic|
|00003580| 6b 3b 0a 58 09 69 6e 74 | 20 61 3b 0a 58 0a 58 09 |k;.X.int| a;.X.X.|
|00003590| 6f 6c 64 3d 30 3b 0a 58 | 09 69 66 28 28 74 62 6c |old=0;.X|.if((tbl|
|000035a0| 3d 66 6f 70 65 6e 28 73 | 74 61 74 2c 22 72 22 29 |=fopen(s|tat,"r")|
|000035b0| 29 20 3d 3d 20 4e 55 4c | 4c 29 7b 0a 58 09 09 66 |) == NUL|L){.X..f|
|000035c0| 70 72 69 6e 74 66 28 73 | 74 64 65 72 72 2c 22 63 |printf(s|tderr,"c|
|000035d0| 61 6e 27 74 20 6f 70 65 | 6e 20 73 75 62 74 61 62 |an't ope|n subtab|
|000035e0| 6c 65 20 25 73 5c 6e 22 | 2c 73 74 61 74 29 3b 0a |le %s\n"|,stat);.|
|000035f0| 58 09 7d 20 65 6c 73 65 | 20 7b 0a 58 09 09 70 69 |X.} else| {.X..pi|
|00003600| 63 6b 20 3d 20 72 6f 6c | 6c 28 6e 75 6d 2c 64 69 |ck = rol|l(num,di|
|00003610| 65 29 3b 0a 58 0a 58 09 | 09 77 68 69 6c 65 28 28 |e);.X.X.|.while((|
|00003620| 66 67 65 74 73 28 6a 75 | 6e 6b 2c 42 55 46 53 49 |fgets(ju|nk,BUFSI|
|00003630| 5a 2d 33 2c 74 62 6c 29 | 29 20 21 3d 20 4e 55 4c |Z-3,tbl)|) != NUL|
|00003640| 4c 29 7b 0a 58 09 09 09 | 69 66 28 73 73 63 61 6e |L){.X...|if(sscan|
|00003650| 66 28 6a 75 6e 6b 2c 22 | 25 64 22 2c 26 6e 65 77 |f(junk,"|%d",&new|
|00003660| 29 29 20 7b 0a 58 09 09 | 09 09 69 66 28 20 70 69 |)) {.X..|..if( pi|
|00003670| 63 6b 20 3e 20 6f 6c 64 | 20 26 26 20 20 70 69 63 |ck > old| && pic|
|00003680| 6b 20 3c 3d 20 6e 65 77 | 29 20 7b 0a 58 09 09 09 |k <= new|) {.X...|
|00003690| 09 09 69 66 20 28 73 73 | 63 61 6e 66 28 6a 75 6e |..if (ss|canf(jun|
|000036a0| 6b 2c 22 25 73 22 2c 77 | 6f 72 64 29 3d 3d 30 29 |k,"%s",w|ord)==0)|
|000036b0| 20 7b 0a 58 09 09 09 09 | 09 09 66 70 72 69 6e 74 | {.X....|..fprint|
|000036c0| 66 28 73 74 64 65 72 72 | 2c 20 22 69 6e 76 61 6c |f(stderr|, "inval|
|000036d0| 69 64 20 66 6f 72 6d 61 | 74 5c 6e 22 29 3b 0a 58 |id forma|t\n");.X|
|000036e0| 09 09 09 09 09 09 65 78 | 69 74 28 31 29 3b 0a 58 |......ex|it(1);.X|
|000036f0| 09 09 09 09 09 7d 0a 58 | 09 09 09 09 09 6a 75 6e |.....}.X|.....jun|
|00003700| 6b 5b 73 74 72 6c 65 6e | 28 6a 75 6e 6b 29 2d 31 |k[strlen|(junk)-1|
|00003710| 5d 20 3d 20 27 20 27 3b | 0a 58 0a 58 09 09 09 09 |] = ' ';|.X.X....|
|00003720| 2f 2a 20 43 48 47 33 29 | 20 4e 65 73 74 69 6e 67 |/* CHG3)| Nesting|
|00003730| 20 6f 66 20 73 75 62 74 | 61 62 6c 65 73 2e 0a 58 | of subt|ables..X|
|00003740| 09 09 09 09 20 2a 20 20 | 20 20 20 20 20 53 6b 69 |.... * | Ski|
|00003750| 70 20 6f 76 65 72 20 6e | 75 6d 62 65 72 2c 20 74 |p over n|umber, t|
|00003760| 68 65 6e 20 63 61 6c 6c | 0a 58 09 09 09 09 20 2a |hen call|.X.... *|
|00003770| 20 20 20 20 20 20 20 64 | 6f 70 61 72 73 65 28 29 | d|oparse()|
|00003780| 20 74 6f 20 72 65 2d 70 | 61 72 73 65 20 74 68 65 | to re-p|arse the|
|00003790| 20 72 65 73 74 2e 0a 58 | 09 09 09 09 20 2a 2f 0a | rest..X|.... */.|
|000037a0| 58 09 09 09 09 09 66 6f | 72 28 61 3d 30 3b 6a 75 |X.....fo|r(a=0;ju|
|000037b0| 6e 6b 5b 61 5d 20 21 3d | 20 27 20 27 3b 61 2b 2b |nk[a] !=| ' ';a++|
|000037c0| 29 3b 0a 58 09 09 09 09 | 09 61 2b 2b 3b 20 20 20 |);.X....|.a++; |
|000037d0| 20 20 20 2f 2a 20 73 6b | 69 70 20 6f 76 65 72 20 | /* sk|ip over |
|000037e0| 6c 65 61 64 69 6e 67 20 | 73 70 61 63 65 20 2a 2f |leading |space */|
|000037f0| 0a 58 09 09 09 09 09 64 | 6f 70 61 72 73 65 28 26 |.X.....d|oparse(&|
|00003800| 6a 75 6e 6b 5b 61 5d 29 | 3b 0a 58 09 09 09 09 09 |junk[a])|;.X.....|
|00003810| 62 72 65 61 6b 3b 0a 58 | 09 09 09 09 7d 0a 58 09 |break;.X|....}.X.|
|00003820| 09 09 09 6f 6c 64 20 3d | 20 6e 65 77 3b 0a 58 09 |...old =| new;.X.|
|00003830| 09 09 7d 0a 58 09 09 7d | 0a 58 09 7d 0a 58 09 69 |..}.X..}|.X.}.X.i|
|00003840| 66 28 66 63 6c 6f 73 65 | 28 74 62 6c 29 3d 3d 20 |f(fclose|(tbl)== |
|00003850| 45 4f 46 29 20 7b 0a 58 | 09 09 66 70 72 69 6e 74 |EOF) {.X|..fprint|
|00003860| 66 28 73 74 64 65 72 72 | 2c 22 75 6e 75 73 75 61 |f(stderr|,"unusua|
|00003870| 6c 20 66 69 6c 65 2d 63 | 6c 6f 73 65 20 65 72 72 |l file-c|lose err|
|00003880| 6f 72 5c 6e 22 29 3b 0a | 58 09 09 65 78 69 74 28 |or\n");.|X..exit(|
|00003890| 31 29 3b 0a 58 09 7d 0a | 58 7d 0a 58 0a 58 2f 2a |1);.X.}.|X}.X.X/*|
|000038a0| 20 70 72 69 6e 74 73 20 | 61 20 73 74 61 74 20 3c | prints |a stat <|
|000038b0| 73 74 61 74 3e 20 69 73 | 20 73 74 61 74 6e 61 6d |stat> is| statnam|
|000038c0| 65 2c 20 3c 6e 75 6d 3e | 20 69 73 20 6e 75 6d 62 |e, <num>| is numb|
|000038d0| 65 72 20 6f 66 20 64 69 | 63 65 2c 20 61 6e 64 20 |er of di|ce, and |
|000038e0| 0a 58 09 3c 64 69 65 3e | 20 69 73 20 68 6f 77 20 |.X.<die>| is how |
|000038f0| 6d 61 6e 79 20 73 69 64 | 65 73 20 74 68 65 20 64 |many sid|es the d|
|00003900| 69 65 20 68 61 73 2e 20 | 2a 2f 0a 58 0a 58 64 6f |ie has. |*/.X.Xdo|
|00003910| 73 74 61 74 28 73 74 61 | 74 2c 6e 75 6d 2c 64 69 |stat(sta|t,num,di|
|00003920| 65 29 0a 58 63 68 61 72 | 20 73 74 61 74 5b 5d 3b |e).Xchar| stat[];|
|00003930| 0a 58 69 6e 74 09 6e 75 | 6d 3b 0a 58 69 6e 74 09 |.Xint.nu|m;.Xint.|
|00003940| 64 69 65 3b 0a 58 7b 0a | 58 09 2f 2a 20 43 48 47 |die;.X{.|X./* CHG|
|00003950| 34 29 20 41 6c 74 65 72 | 6e 61 74 65 20 66 6f 72 |4) Alter|nate for|
|00003960| 6d 61 74 20 6f 66 20 73 | 74 61 74 20 63 6f 6d 6d |mat of s|tat comm|
|00003970| 61 6e 64 2e 20 2a 2f 0a | 58 0a 58 09 69 66 28 20 |and. */.|X.X.if( |
|00003980| 73 74 61 74 5b 30 5d 20 | 3d 3d 20 27 2a 27 20 29 |stat[0] |== '*' )|
|00003990| 20 7b 0a 58 09 09 70 72 | 69 6e 74 66 28 22 25 64 | {.X..pr|intf("%d|
|000039a0| 20 25 73 22 2c 20 72 6f | 6c 6c 28 6e 75 6d 2c 64 | %s", ro|ll(num,d|
|000039b0| 69 65 29 2c 20 26 73 74 | 61 74 5b 31 5d 29 3b 0a |ie), &st|at[1]);.|
|000039c0| 58 09 7d 20 65 6c 73 65 | 20 7b 0a 58 09 09 70 72 |X.} else| {.X..pr|
|000039d0| 69 6e 74 66 28 22 25 73 | 3a 20 20 25 64 22 2c 73 |intf("%s|: %d",s|
|000039e0| 74 61 74 2c 72 6f 6c 6c | 28 6e 75 6d 2c 64 69 65 |tat,roll|(num,die|
|000039f0| 29 29 3b 0a 58 09 7d 0a | 58 7d 0a 58 0a 58 2f 2a |));.X.}.|X}.X.X/*|
|00003a00| 20 64 6f 70 61 72 73 65 | 20 6c 6f 6f 6b 73 20 66 | doparse| looks f|
|00003a10| 6f 72 20 74 68 65 20 6d | 61 67 69 63 20 77 6f 72 |or the m|agic wor|
|00003a20| 64 73 20 22 74 61 62 6c | 65 22 20 22 73 75 62 74 |ds "tabl|e" "subt|
|00003a30| 61 62 6c 65 22 20 22 5c | 74 22 20 6f 72 20 22 5c |able" "\|t" or "\|
|00003a40| 6c 22 0a 58 09 61 6e 64 | 20 64 6f 65 73 20 74 68 |l".X.and| does th|
|00003a50| 65 20 61 70 70 72 6f 70 | 72 69 61 74 65 20 74 68 |e approp|riate th|
|00003a60| 69 6e 67 20 69 66 20 69 | 74 20 65 6e 63 6f 75 6e |ing if i|t encoun|
|00003a70| 74 65 72 73 20 74 68 65 | 6d 2e 20 69 66 20 69 74 |ters the|m. if it|
|00003a80| 0a 58 09 64 6f 65 73 20 | 6e 6f 74 2c 20 69 74 20 |.X.does |not, it |
|00003a90| 64 75 6d 70 73 20 69 74 | 20 61 73 20 74 65 78 74 |dumps it| as text|
|00003aa0| 20 2a 2f 0a 58 0a 58 64 | 6f 70 61 72 73 65 28 6a | */.X.Xd|oparse(j|
|00003ab0| 75 6e 6b 29 0a 58 63 68 | 61 72 20 6a 75 6e 6b 5b |unk).Xch|ar junk[|
|00003ac0| 5d 3b 0a 58 7b 0a 58 09 | 63 68 61 72 20 73 74 61 |];.X{.X.|char sta|
|00003ad0| 74 5b 32 30 30 5d 3b 0a | 58 09 63 68 61 72 20 77 |t[200];.|X.char w|
|00003ae0| 6f 72 64 5b 32 30 30 5d | 3b 0a 58 09 69 6e 74 20 |ord[200]|;.X.int |
|00003af0| 64 69 65 3b 0a 58 09 69 | 6e 74 20 6e 75 6d 3b 0a |die;.X.i|nt num;.|
|00003b00| 58 0a 58 09 69 66 28 20 | 6a 75 6e 6b 5b 30 5d 20 |X.X.if( |junk[0] |
|00003b10| 3d 3d 20 27 5c 5c 27 29 | 20 7b 0a 58 09 09 73 77 |== '\\')| {.X..sw|
|00003b20| 69 74 63 68 28 6a 75 6e | 6b 5b 31 5d 29 20 7b 0a |itch(jun|k[1]) {.|
|00003b30| 58 09 09 63 61 73 65 20 | 27 6c 27 3a 0a 58 09 09 |X..case |'l':.X..|
|00003b40| 09 70 75 74 63 68 61 72 | 28 31 32 29 3b 0a 58 09 |.putchar|(12);.X.|
|00003b50| 09 09 62 72 65 61 6b 3b | 0a 58 09 09 63 61 73 65 |..break;|.X..case|
|00003b60| 20 27 74 27 3a 0a 58 09 | 09 09 70 72 69 6e 74 66 | 't':.X.|..printf|
|00003b70| 28 22 5c 74 22 29 3b 0a | 58 09 09 09 62 72 65 61 |("\t");.|X...brea|
|00003b80| 6b 3b 0a 58 09 09 7d 0a | 58 09 7d 20 65 6c 73 65 |k;.X..}.|X.} else|
|00003b90| 20 7b 0a 58 09 09 69 66 | 28 28 73 73 63 61 6e 66 | {.X..if|((sscanf|
|00003ba0| 28 6a 75 6e 6b 2c 22 25 | 73 20 25 73 20 25 64 20 |(junk,"%|s %s %d |
|00003bb0| 25 64 22 2c 0a 58 09 09 | 20 20 20 20 77 6f 72 64 |%d",.X..| word|
|00003bc0| 2c 73 74 61 74 2c 26 6e | 75 6d 2c 26 64 69 65 29 |,stat,&n|um,&die)|
|00003bd0| 29 21 3d 20 34 29 20 7b | 0a 58 09 09 09 64 6f 74 |)!= 4) {|.X...dot|
|00003be0| 65 78 74 28 6a 75 6e 6b | 29 3b 0a 58 09 09 7d 20 |ext(junk|);.X..} |
|00003bf0| 65 6c 73 65 20 7b 0a 58 | 09 09 09 69 66 28 21 73 |else {.X|...if(!s|
|00003c00| 74 72 63 6d 70 28 77 6f | 72 64 2c 22 73 75 62 74 |trcmp(wo|rd,"subt|
|00003c10| 61 62 6c 65 22 29 29 0a | 58 09 09 09 09 64 6f 73 |able")).|X....dos|
|00003c20| 75 62 74 61 62 6c 65 28 | 73 74 61 74 2c 6e 75 6d |ubtable(|stat,num|
|00003c30| 2c 64 69 65 29 3b 0a 58 | 09 09 09 65 6c 73 65 20 |,die);.X|...else |
|00003c40| 69 66 28 21 73 74 72 63 | 6d 70 28 77 6f 72 64 2c |if(!strc|mp(word,|
|00003c50| 22 73 74 61 74 22 29 29 | 0a 58 09 09 09 09 64 6f |"stat"))|.X....do|
|00003c60| 73 74 61 74 28 73 74 61 | 74 2c 6e 75 6d 2c 64 69 |stat(sta|t,num,di|
|00003c70| 65 29 3b 0a 58 09 09 09 | 65 6c 73 65 20 69 66 28 |e);.X...|else if(|
|00003c80| 21 73 74 72 63 6d 70 28 | 77 6f 72 64 2c 22 74 61 |!strcmp(|word,"ta|
|00003c90| 62 6c 65 22 29 29 0a 58 | 09 09 09 09 64 6f 74 61 |ble")).X|....dota|
|00003ca0| 62 6c 65 28 73 74 61 74 | 29 3b 0a 58 09 09 09 65 |ble(stat|);.X...e|
|00003cb0| 6c 73 65 0a 58 09 09 09 | 09 64 6f 74 65 78 74 28 |lse.X...|.dotext(|
|00003cc0| 6a 75 6e 6b 29 3b 0a 58 | 09 09 7d 0a 58 09 7d 0a |junk);.X|..}.X.}.|
|00003cd0| 58 7d 0a 58 0a 58 2f 2a | 20 64 6f 68 61 63 6b 20 |X}.X.X/*| dohack |
|00003ce0| 74 61 6b 65 73 20 61 20 | 73 74 72 69 6e 67 20 61 |takes a |string a|
|00003cf0| 6e 64 20 64 75 6d 70 73 | 20 61 6c 6c 20 6f 66 20 |nd dumps| all of |
|00003d00| 69 74 20 65 78 63 65 70 | 74 20 74 68 65 20 46 49 |it excep|t the FI|
|00003d10| 52 53 54 20 77 6f 72 64 | 2e 0a 58 09 74 68 69 73 |RST word|..X.this|
|00003d20| 20 69 73 20 62 61 73 69 | 63 61 6c 6c 79 20 75 73 | is basi|cally us|
|00003d30| 65 66 75 6c 20 66 6f 72 | 20 70 72 69 6e 74 69 6e |eful for| printin|
|00003d40| 67 20 73 75 62 74 61 62 | 6c 65 20 65 6e 74 72 69 |g subtab|le entri|
|00003d50| 65 73 2e 0a 58 09 77 68 | 69 6c 65 20 74 68 65 72 |es..X.wh|ile ther|
|00003d60| 65 20 61 72 65 20 6d 6f | 72 65 20 65 6c 65 67 61 |e are mo|re elega|
|00003d70| 6e 74 20 77 61 79 73 20 | 6f 66 20 64 6f 69 6e 67 |nt ways |of doing|
|00003d80| 20 74 68 69 73 20 69 6e | 20 43 2c 0a 58 09 6d 79 | this in| C,.X.my|
|00003d90| 20 4c 61 74 74 69 63 65 | 20 63 6f 6d 70 69 6c 65 | Lattice| compile|
|00003da0| 72 20 64 69 65 73 20 77 | 68 65 6e 20 49 20 74 72 |r dies w|hen I tr|
|00003db0| 79 20 69 74 2e 20 2a 2f | 0a 58 0a 58 64 6f 68 61 |y it. */|.X.Xdoha|
|00003dc0| 63 6b 28 73 74 72 69 6e | 67 29 0a 58 63 68 61 72 |ck(strin|g).Xchar|
|00003dd0| 20 73 74 72 69 6e 67 5b | 42 55 46 53 49 5a 5d 3b | string[|BUFSIZ];|
|00003de0| 0a 58 7b 0a 58 09 69 6e | 74 20 61 20 3d 20 30 3b |.X{.X.in|t a = 0;|
|00003df0| 0a 58 09 69 6e 74 20 62 | 20 3d 20 30 3b 0a 58 0a |.X.int b| = 0;.X.|
|00003e00| 58 09 77 68 69 6c 65 28 | 62 20 3d 3d 20 30 29 0a |X.while(|b == 0).|
|00003e10| 58 09 09 69 66 28 73 74 | 72 69 6e 67 5b 61 2b 2b |X..if(st|ring[a++|
|00003e20| 5d 20 3d 3d 20 27 20 27 | 29 0a 58 09 09 09 62 2b |] == ' '|).X...b+|
|00003e30| 2b 3b 0a 58 09 66 6f 72 | 28 62 20 3d 20 61 3b 20 |+;.X.for|(b = a; |
|00003e40| 62 20 3c 20 73 74 72 6c | 65 6e 28 73 74 72 69 6e |b < strl|en(strin|
|00003e50| 67 29 3b 20 62 2b 2b 29 | 0a 58 09 09 70 75 74 63 |g); b++)|.X..putc|
|00003e60| 68 61 72 28 73 74 72 69 | 6e 67 5b 62 5d 29 3b 0a |har(stri|ng[b]);.|
|00003e70| 58 7d 0a 58 0a 58 2f 2a | 20 64 6f 74 65 78 74 20 |X}.X.X/*| dotext |
|00003e80| 62 61 73 69 63 61 6c 6c | 79 20 64 75 6d 70 73 20 |basicall|y dumps |
|00003e90| 61 20 74 65 78 74 20 73 | 74 72 69 6e 67 2e 0a 58 |a text s|tring..X|
|00003ea0| 09 69 66 20 74 68 65 20 | 32 6e 64 20 74 6f 20 6c |.if the |2nd to l|
|00003eb0| 61 73 74 20 63 68 61 72 | 20 28 6e 65 77 6c 69 6e |ast char| (newlin|
|00003ec0| 65 20 69 73 20 6c 61 73 | 74 29 20 69 73 20 61 20 |e is las|t) is a |
|00003ed0| 22 3a 22 20 0a 58 09 69 | 74 20 64 6f 65 73 20 4e |":" .X.i|t does N|
|00003ee0| 4f 54 20 70 75 74 20 61 | 20 6e 65 77 6c 69 6e 65 |OT put a| newline|
|00003ef0| 20 6f 6e 2e 20 74 68 69 | 73 20 69 73 20 74 6f 20 | on. thi|s is to |
|00003f00| 61 6c 6c 6f 77 20 79 6f | 75 20 74 6f 20 0a 58 09 |allow yo|u to .X.|
|00003f10| 68 61 76 65 20 69 74 65 | 6d 73 20 66 72 6f 6d 20 |have ite|ms from |
|00003f20| 73 75 62 74 61 62 6c 65 | 73 20 61 70 70 65 61 72 |subtable|s appear|
|00003f30| 20 61 66 74 65 72 20 61 | 20 3a 09 2a 2f 0a 58 0a | after a| :.*/.X.|
|00003f40| 58 64 6f 74 65 78 74 28 | 73 74 72 69 6e 67 29 0a |Xdotext(|string).|
|00003f50| 58 63 68 61 72 20 73 74 | 72 69 6e 67 5b 42 55 46 |Xchar st|ring[BUF|
|00003f60| 53 49 5a 5d 3b 0a 58 7b | 0a 58 09 69 6e 74 20 63 |SIZ];.X{|.X.int c|
|00003f70| 3b 0a 58 09 0a 58 09 63 | 20 3d 20 28 73 74 72 6c |;.X..X.c| = (strl|
|00003f80| 65 6e 28 73 74 72 69 6e | 67 29 2d 32 29 3b 0a 58 |en(strin|g)-2);.X|
|00003f90| 09 69 66 20 28 73 74 72 | 69 6e 67 5b 63 5d 20 3d |.if (str|ing[c] =|
|00003fa0| 3d 20 27 3a 27 29 0a 58 | 09 09 73 74 72 69 6e 67 |= ':').X|..string|
|00003fb0| 5b 2b 2b 63 5d 20 3d 20 | 27 20 27 3b 0a 58 09 70 |[++c] = |' ';.X.p|
|00003fc0| 72 69 6e 74 66 28 22 25 | 73 22 2c 73 74 72 69 6e |rintf("%|s",strin|
|00003fd0| 67 29 3b 0a 58 7d 0a 45 | 4e 44 5f 4f 46 5f 72 6e |g);.X}.E|ND_OF_rn|
|00003fe0| 64 2e 63 0a 69 66 20 74 | 65 73 74 20 34 39 33 30 |d.c.if t|est 4930|
|00003ff0| 20 2d 6e 65 20 60 77 63 | 20 2d 63 20 3c 72 6e 64 | -ne `wc| -c <rnd|
|00004000| 2e 63 60 3b 20 74 68 65 | 6e 0a 20 20 20 20 65 63 |.c`; the|n. ec|
|00004010| 68 6f 20 73 68 61 72 3a | 20 5c 22 72 6e 64 2e 63 |ho shar:| \"rnd.c|
|00004020| 5c 22 20 75 6e 70 61 63 | 6b 65 64 20 77 69 74 68 |\" unpac|ked with|
|00004030| 20 77 72 6f 6e 67 20 73 | 69 7a 65 21 0a 66 69 0a | wrong s|ize!.fi.|
|00004040| 23 20 65 6e 64 20 6f 66 | 20 6f 76 65 72 77 72 69 |# end of| overwri|
|00004050| 74 69 6e 67 20 63 68 65 | 63 6b 0a 66 69 0a 69 66 |ting che|ck.fi.if|
|00004060| 20 74 65 73 74 20 21 20 | 2d 64 20 44 75 6e 67 65 | test ! |-d Dunge|
|00004070| 6f 6e 20 3b 20 74 68 65 | 6e 0a 20 20 20 20 65 63 |on ; the|n. ec|
|00004080| 68 6f 20 73 68 61 72 3a | 20 43 72 65 61 74 69 6e |ho shar:| Creatin|
|00004090| 67 20 64 69 72 65 63 74 | 6f 72 79 20 5c 22 44 75 |g direct|ory \"Du|
|000040a0| 6e 67 65 6f 6e 5c 22 0a | 20 20 20 20 6d 6b 64 69 |ngeon\".| mkdi|
|000040b0| 72 20 44 75 6e 67 65 6f | 6e 0a 66 69 0a 69 66 20 |r Dungeo|n.fi.if |
|000040c0| 74 65 73 74 20 2d 66 20 | 44 75 6e 67 65 6f 6e 2f |test -f |Dungeon/|
|000040d0| 43 41 54 5f 4d 45 20 2d | 61 20 22 24 7b 31 7d 22 |CAT_ME -|a "${1}"|
|000040e0| 20 21 3d 20 22 2d 63 22 | 20 3b 20 74 68 65 6e 20 | != "-c"| ; then |
|000040f0| 0a 20 20 65 63 68 6f 20 | 73 68 61 72 3a 20 57 69 |. echo |shar: Wi|
|00004100| 6c 6c 20 6e 6f 74 20 6f | 76 65 72 2d 77 72 69 74 |ll not o|ver-writ|
|00004110| 65 20 65 78 69 73 74 69 | 6e 67 20 66 69 6c 65 20 |e existi|ng file |
|00004120| 5c 22 44 75 6e 67 65 6f | 6e 2f 43 41 54 5f 4d 45 |\"Dungeo|n/CAT_ME|
|00004130| 5c 22 0a 65 6c 73 65 0a | 65 63 68 6f 20 73 68 61 |\".else.|echo sha|
|00004140| 72 3a 20 45 78 74 72 61 | 63 74 69 6e 67 20 5c 22 |r: Extra|cting \"|
|00004150| 44 75 6e 67 65 6f 6e 2f | 43 41 54 5f 4d 45 5c 22 |Dungeon/|CAT_ME\"|
|00004160| 20 5c 28 31 35 35 32 20 | 63 68 61 72 61 63 74 65 | \(1552 |characte|
|00004170| 72 73 5c 29 0a 73 65 64 | 20 22 73 2f 5e 58 2f 2f |rs\).sed| "s/^X//|
|00004180| 22 20 3e 44 75 6e 67 65 | 6f 6e 2f 43 41 54 5f 4d |" >Dunge|on/CAT_M|
|00004190| 45 20 3c 3c 27 45 4e 44 | 5f 4f 46 5f 44 75 6e 67 |E <<'END|_OF_Dung|
|000041a0| 65 6f 6e 2f 43 41 54 5f | 4d 45 27 0a 58 20 20 20 |eon/CAT_|ME'.X |
|000041b0| 20 49 6e 20 74 68 69 73 | 20 73 75 62 64 69 72 65 | In this| subdire|
|000041c0| 63 74 6f 72 79 20 69 73 | 20 61 20 73 61 6d 70 6c |ctory is| a sampl|
|000041d0| 65 20 64 75 6e 67 65 6f | 6e 20 63 72 65 61 74 6f |e dungeo|n creato|
|000041e0| 72 2e 20 54 68 65 20 62 | 61 73 69 63 0a 58 69 64 |r. The b|asic.Xid|
|000041f0| 65 61 20 69 73 20 74 68 | 61 74 20 61 20 64 75 6e |ea is th|at a dun|
|00004200| 67 65 6f 6e 20 69 73 20 | 6d 61 64 65 20 75 70 20 |geon is |made up |
|00004210| 6f 66 20 43 6f 72 72 69 | 64 6f 72 73 2c 20 44 6f |of Corri|dors, Do|
|00004220| 6f 72 73 2c 20 52 6f 6f | 6d 73 2c 20 61 6e 64 0a |ors, Roo|ms, and.|
|00004230| 58 43 72 65 61 74 75 72 | 65 73 20 74 68 61 74 20 |XCreatur|es that |
|00004240| 69 6e 68 61 62 69 74 20 | 74 68 65 6d 2e 20 20 41 |inhabit |them. A|
|00004250| 20 63 6f 72 72 69 64 6f | 72 20 63 61 6e 20 68 61 | corrido|r can ha|
|00004260| 76 65 20 63 72 65 61 74 | 75 72 65 73 2c 20 64 6f |ve creat|ures, do|
|00004270| 6f 72 73 2c 0a 58 61 6e | 64 20 74 72 61 70 73 2c |ors,.Xan|d traps,|
|00004280| 20 77 68 65 72 65 61 73 | 20 64 6f 6f 72 73 20 63 | whereas| doors c|
|00004290| 61 6e 20 68 61 76 65 20 | 63 6f 72 72 69 64 6f 72 |an have |corridor|
|000042a0| 73 20 6f 72 20 63 6c 6f | 73 65 74 73 20 6f 72 20 |s or clo|sets or |
|000042b0| 72 6f 6f 6d 73 0a 58 62 | 65 68 69 6e 64 20 74 68 |rooms.Xb|ehind th|
|000042c0| 65 6d 2e 20 20 41 20 72 | 6f 6f 6d 20 63 61 6e 20 |em. A r|oom can |
|000042d0| 68 61 76 65 20 73 6f 6d | 65 20 65 78 69 74 73 2c |have som|e exits,|
|000042e0| 20 61 20 74 72 61 70 2c | 20 61 6e 64 20 70 6f 73 | a trap,| and pos|
|000042f0| 73 69 62 6c 79 20 61 20 | 0a 58 6d 6f 6e 73 74 65 |sibly a |.Xmonste|
|00004300| 72 20 6f 72 20 74 72 65 | 61 73 75 72 65 2e 20 20 |r or tre|asure. |
|00004310| 43 72 65 61 74 75 72 65 | 73 20 68 61 76 65 20 61 |Creature|s have a|
|00004320| 74 74 72 69 62 75 74 65 | 73 2c 20 70 6f 73 73 65 |ttribute|s, posse|
|00004330| 73 73 69 6f 6e 73 20 61 | 6e 64 0a 58 77 65 61 70 |ssions a|nd.Xweap|
|00004340| 6f 6e 73 2e 20 20 43 72 | 65 61 74 75 72 65 73 20 |ons. Cr|eatures |
|00004350| 73 6f 6d 65 74 69 6d 65 | 73 20 63 6f 6d 65 20 75 |sometime|s come u|
|00004360| 70 20 77 69 74 68 20 77 | 65 69 72 64 20 63 6f 6d |p with w|eird com|
|00004370| 62 69 6e 61 74 69 6f 6e | 73 20 6f 66 0a 58 77 65 |bination|s of.Xwe|
|00004380| 61 70 6f 6e 73 2c 20 73 | 75 63 68 20 61 73 20 61 |apons, s|uch as a|
|00004390| 20 66 6c 6f 61 74 69 6e | 67 20 65 79 65 20 75 73 | floatin|g eye us|
|000043a0| 69 6e 67 20 61 20 6c 6f | 6e 67 20 73 77 6f 72 64 |ing a lo|ng sword|
|000043b0| 2c 20 69 66 20 74 68 69 | 73 20 6f 63 63 75 72 73 |, if thi|s occurs|
|000043c0| 2c 0a 58 63 6f 6e 73 69 | 64 65 72 20 69 74 20 70 |,.Xconsi|der it p|
|000043d0| 61 72 74 20 6f 66 20 74 | 68 65 20 74 72 65 61 73 |art of t|he treas|
|000043e0| 75 72 65 20 69 6e 73 74 | 65 61 64 2e 20 20 0a 58 |ure inst|ead. .X|
|000043f0| 0a 58 20 20 20 20 4e 6f | 74 65 20 74 68 61 74 20 |.X No|te that |
|00004400| 49 20 68 61 76 65 20 61 | 64 6f 70 74 65 64 20 61 |I have a|dopted a|
|00004410| 20 63 6f 6e 76 65 6e 74 | 69 6f 6e 20 74 68 61 74 | convent|ion that|
|00004420| 20 74 61 62 6c 65 20 66 | 69 6c 65 73 20 73 74 61 | table f|iles sta|
|00004430| 72 74 20 0a 58 77 69 74 | 68 20 61 20 63 61 70 69 |rt .Xwit|h a capi|
|00004440| 74 61 6c 20 6c 65 74 74 | 65 72 2c 20 61 6e 64 20 |tal lett|er, and |
|00004450| 73 75 62 74 61 62 6c 65 | 20 66 69 6c 65 73 20 61 |subtable| files a|
|00004460| 72 65 20 6c 6f 77 65 72 | 2d 63 61 73 65 2e 20 20 |re lower|-case. |
|00004470| 54 68 69 73 20 68 65 6c | 70 73 0a 58 74 6f 20 72 |This hel|ps.Xto r|
|00004480| 65 6d 65 6d 62 65 72 20 | 77 68 69 63 68 20 63 61 |emember |which ca|
|00004490| 6e 20 62 65 20 75 73 65 | 64 20 61 73 20 69 6e 70 |n be use|d as inp|
|000044a0| 75 74 20 66 69 6c 65 73 | 2e 20 20 0a 58 0a 58 54 |ut files|. .X.XT|
|000044b0| 68 65 20 74 61 62 6c 65 | 73 20 28 69 6e 70 75 74 |he table|s (input|
|000044c0| 20 66 69 6c 65 73 29 3a | 0a 58 0a 58 20 20 20 20 | files):|.X.X |
|000044d0| 43 6f 72 72 69 64 6f 72 | 20 2d 20 54 68 65 20 6d |Corridor| - The m|
|000044e0| 61 69 6e 20 74 61 62 6c | 65 2c 20 74 68 69 73 20 |ain tabl|e, this |
|000044f0| 77 69 6c 6c 20 63 72 65 | 61 74 65 20 74 68 65 20 |will cre|ate the |
|00004500| 6e 65 78 74 20 73 65 63 | 74 69 6f 6e 20 6f 66 0a |next sec|tion of.|
|00004510| 58 09 09 61 20 64 75 6e | 67 65 6f 6e 20 63 6f 72 |X..a dun|geon cor|
|00004520| 72 69 64 6f 72 2e 0a 58 | 0a 58 20 20 20 20 43 72 |ridor..X|.X Cr|
|00004530| 65 61 74 75 72 65 20 2d | 20 49 66 20 79 6f 75 20 |eature -| If you |
|00004540| 6e 65 65 64 20 61 6e 6f | 74 68 65 72 20 6d 6f 6e |need ano|ther mon|
|00004550| 73 74 65 72 2c 20 75 73 | 65 20 74 68 69 73 20 74 |ster, us|e this t|
|00004560| 61 62 6c 65 2e 0a 58 0a | 58 20 20 20 20 44 6f 6f |able..X.|X Doo|
|00004570| 72 20 20 20 20 20 2d 20 | 55 73 65 20 74 68 69 73 |r - |Use this|
|00004580| 20 74 6f 20 64 65 73 63 | 72 69 62 65 20 74 68 65 | to desc|ribe the|
|00004590| 20 64 6f 6f 72 73 20 69 | 6e 20 61 20 72 6f 6f 6d | doors i|n a room|
|000045a0| 2c 20 74 6f 20 65 78 70 | 61 6e 64 0a 58 09 09 74 |, to exp|and.X..t|
|000045b0| 68 65 20 64 75 6e 67 65 | 6f 6e 20 74 68 61 74 20 |he dunge|on that |
|000045c0| 77 61 79 2e 0a 58 0a 58 | 20 20 20 20 52 6f 6f 6d |way..X.X| Room|
|000045d0| 20 20 20 20 20 2d 20 55 | 73 65 20 74 68 69 73 20 | - U|se this |
|000045e0| 74 6f 20 64 65 73 63 72 | 69 62 65 20 61 6e 20 65 |to descr|ibe an e|
|000045f0| 78 74 72 61 20 72 6f 6f | 6d 20 74 68 72 6f 77 6e |xtra roo|m thrown|
|00004600| 20 69 6e 20 66 6f 72 20 | 67 6f 6f 64 0a 58 20 20 | in for |good.X |
|00004610| 20 09 09 20 6d 65 61 73 | 75 72 65 2e 0a 58 0a 58 | .. meas|ure..X.X|
|00004620| 20 20 20 20 54 72 79 20 | 69 74 20 2d 20 59 6f 75 | Try |it - You|
|00004630| 27 6c 6c 20 6c 69 6b 65 | 20 69 74 2e 20 20 49 66 |'ll like| it. If|
|00004640| 20 79 6f 75 20 6d 61 6b | 65 20 61 6e 79 20 65 6e | you mak|e any en|
|00004650| 68 61 6e 63 65 6d 65 6e | 74 73 20 74 6f 20 74 68 |hancemen|ts to th|
|00004660| 69 73 2c 0a 58 70 6c 65 | 61 73 65 20 6c 65 74 20 |is,.Xple|ase let |
|00004670| 6d 65 20 6b 6e 6f 77 2e | 20 20 49 20 68 6f 70 65 |me know.| I hope|
|00004680| 20 79 6f 75 20 65 6e 6a | 6f 79 20 74 68 69 73 20 | you enj|oy this |
|00004690| 61 6e 64 20 74 61 6b 65 | 20 69 74 20 61 73 20 61 |and take| it as a|
|000046a0| 6e 20 41 69 64 20 2d 0a | 58 6e 6f 74 20 74 68 65 |n Aid -.|Xnot the|
|000046b0| 20 65 6e 64 2d 61 6c 6c | 20 6f 66 20 64 75 6e 67 | end-all| of dung|
|000046c0| 65 6f 6e 20 63 72 65 61 | 74 69 6f 6e 2e 20 20 45 |eon crea|tion. E|
|000046d0| 6e 6a 6f 79 21 0a 58 0a | 58 09 52 65 61 6c 20 4c |njoy!.X.|X.Real L|
|000046e0| 69 66 65 3f 3a 09 44 61 | 6c 65 20 53 61 6c 79 65 |ife?:.Da|le Salye|
|000046f0| 72 20 28 50 72 6f 67 72 | 61 6d 6d 65 72 20 6f 66 |r (Progr|ammer of|
|00004700| 20 74 68 65 20 54 68 69 | 72 64 20 4c 65 76 65 6c | the Thi|rd Level|
|00004710| 29 0a 58 09 46 61 6e 74 | 61 73 79 3a 09 44 61 72 |).X.Fant|asy:.Dar|
|00004720| 6b 20 53 74 61 72 20 28 | 54 68 69 65 66 20 6f 66 |k Star (|Thief of|
|00004730| 20 74 68 65 20 46 69 66 | 74 68 20 4c 65 76 65 6c | the Fif|th Level|
|00004740| 29 0a 58 09 09 09 43 6f | 79 6f 74 65 20 28 48 61 |).X...Co|yote (Ha|
|00004750| 6c 66 2d 43 6f 79 6f 74 | 65 20 2d 20 52 61 6e 67 |lf-Coyot|e - Rang|
|00004760| 65 72 20 6f 66 20 74 68 | 65 20 53 69 78 74 68 20 |er of th|e Sixth |
|00004770| 4c 65 76 65 6c 29 0a 58 | 0a 58 09 45 2d 4d 61 69 |Level).X|.X.E-Mai|
|00004780| 6c 20 41 64 64 72 65 73 | 73 3a 09 2e 2e 2e 21 69 |l Addres|s:....!i|
|00004790| 68 6e 70 34 21 64 72 75 | 68 69 21 64 65 73 0a 58 |hnp4!dru|hi!des.X|
|000047a0| 09 55 2e 53 2e 20 4d 61 | 69 6c 3a 09 41 54 26 54 |.U.S. Ma|il:.AT&T|
|000047b0| 20 49 6e 66 6f 2e 20 53 | 79 73 74 65 6d 73 20 4c | Info. S|ystems L|
|000047c0| 61 62 6f 72 61 74 6f 72 | 69 65 73 0a 58 09 09 09 |aborator|ies.X...|
|000047d0| 44 65 6e 76 65 72 2c 20 | 43 4f 20 38 30 32 32 39 |Denver, |CO 80229|
|000047e0| 0a 58 0a 45 4e 44 5f 4f | 46 5f 44 75 6e 67 65 6f |.X.END_O|F_Dungeo|
|000047f0| 6e 2f 43 41 54 5f 4d 45 | 0a 69 66 20 74 65 73 74 |n/CAT_ME|.if test|
|00004800| 20 31 35 35 32 20 2d 6e | 65 20 60 77 63 20 2d 63 | 1552 -n|e `wc -c|
|00004810| 20 3c 44 75 6e 67 65 6f | 6e 2f 43 41 54 5f 4d 45 | <Dungeo|n/CAT_ME|
|00004820| 60 3b 20 74 68 65 6e 0a | 20 20 20 20 65 63 68 6f |`; then.| echo|
|00004830| 20 73 68 61 72 3a 20 5c | 22 44 75 6e 67 65 6f 6e | shar: \|"Dungeon|
|00004840| 2f 43 41 54 5f 4d 45 5c | 22 20 75 6e 70 61 63 6b |/CAT_ME\|" unpack|
|00004850| 65 64 20 77 69 74 68 20 | 77 72 6f 6e 67 20 73 69 |ed with |wrong si|
|00004860| 7a 65 21 0a 66 69 0a 23 | 20 65 6e 64 20 6f 66 20 |ze!.fi.#| end of |
|00004870| 6f 76 65 72 77 72 69 74 | 69 6e 67 20 63 68 65 63 |overwrit|ing chec|
|00004880| 6b 0a 66 69 0a 69 66 20 | 74 65 73 74 20 2d 66 20 |k.fi.if |test -f |
|00004890| 44 75 6e 67 65 6f 6e 2f | 43 6f 72 72 69 64 6f 72 |Dungeon/|Corridor|
|000048a0| 20 2d 61 20 22 24 7b 31 | 7d 22 20 21 3d 20 22 2d | -a "${1|}" != "-|
|000048b0| 63 22 20 3b 20 74 68 65 | 6e 20 0a 20 20 65 63 68 |c" ; the|n . ech|
|000048c0| 6f 20 73 68 61 72 3a 20 | 57 69 6c 6c 20 6e 6f 74 |o shar: |Will not|
|000048d0| 20 6f 76 65 72 2d 77 72 | 69 74 65 20 65 78 69 73 | over-wr|ite exis|
|000048e0| 74 69 6e 67 20 66 69 6c | 65 20 5c 22 44 75 6e 67 |ting fil|e \"Dung|
|000048f0| 65 6f 6e 2f 43 6f 72 72 | 69 64 6f 72 5c 22 0a 65 |eon/Corr|idor\".e|
|00004900| 6c 73 65 0a 65 63 68 6f | 20 73 68 61 72 3a 20 45 |lse.echo| shar: E|
|00004910| 78 74 72 61 63 74 69 6e | 67 20 5c 22 44 75 6e 67 |xtractin|g \"Dung|
|00004920| 65 6f 6e 2f 43 6f 72 72 | 69 64 6f 72 5c 22 20 5c |eon/Corr|idor\" \|
|00004930| 28 38 31 20 63 68 61 72 | 61 63 74 65 72 73 5c 29 |(81 char|acters\)|
|00004940| 0a 73 65 64 20 22 73 2f | 5e 58 2f 2f 22 20 3e 44 |.sed "s/|^X//" >D|
|00004950| 75 6e 67 65 6f 6e 2f 43 | 6f 72 72 69 64 6f 72 20 |ungeon/C|orridor |
|00004960| 3c 3c 27 45 4e 44 5f 4f | 46 5f 44 75 6e 67 65 6f |<<'END_O|F_Dungeo|
|00004970| 6e 2f 43 6f 72 72 69 64 | 6f 72 27 0a 58 2b 2d 2d |n/Corrid|or'.X+--|
|00004980| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004990| 2d 2d 2d 2d 2d 2d 2d 2b | 0a 58 0a 58 73 75 62 74 |-------+|.X.Xsubt|
|000049a0| 61 62 6c 65 20 63 6f 72 | 72 5f 73 65 63 74 20 31 |able cor|r_sect 1|
|000049b0| 20 31 30 30 0a 58 0a 58 | 73 75 62 74 61 62 6c 65 | 100.X.X|subtable|
|000049c0| 20 63 6f 72 72 5f 63 6f | 6e 74 20 31 20 31 30 30 | corr_co|nt 1 100|
|000049d0| 0a 58 0a 45 4e 44 5f 4f | 46 5f 44 75 6e 67 65 6f |.X.END_O|F_Dungeo|
|000049e0| 6e 2f 43 6f 72 72 69 64 | 6f 72 0a 69 66 20 74 65 |n/Corrid|or.if te|
|000049f0| 73 74 20 38 31 20 2d 6e | 65 20 60 77 63 20 2d 63 |st 81 -n|e `wc -c|
|00004a00| 20 3c 44 75 6e 67 65 6f | 6e 2f 43 6f 72 72 69 64 | <Dungeo|n/Corrid|
|00004a10| 6f 72 60 3b 20 74 68 65 | 6e 0a 20 20 20 20 65 63 |or`; the|n. ec|
|00004a20| 68 6f 20 73 68 61 72 3a | 20 5c 22 44 75 6e 67 65 |ho shar:| \"Dunge|
|00004a30| 6f 6e 2f 43 6f 72 72 69 | 64 6f 72 5c 22 20 75 6e |on/Corri|dor\" un|
|00004a40| 70 61 63 6b 65 64 20 77 | 69 74 68 20 77 72 6f 6e |packed w|ith wron|
|00004a50| 67 20 73 69 7a 65 21 0a | 66 69 0a 23 20 65 6e 64 |g size!.|fi.# end|
|00004a60| 20 6f 66 20 6f 76 65 72 | 77 72 69 74 69 6e 67 20 | of over|writing |
|00004a70| 63 68 65 63 6b 0a 66 69 | 0a 69 66 20 74 65 73 74 |check.fi|.if test|
|00004a80| 20 2d 66 20 44 75 6e 67 | 65 6f 6e 2f 43 72 65 61 | -f Dung|eon/Crea|
|00004a90| 74 75 72 65 20 2d 61 20 | 22 24 7b 31 7d 22 20 21 |ture -a |"${1}" !|
|00004aa0| 3d 20 22 2d 63 22 20 3b | 20 74 68 65 6e 20 0a 20 |= "-c" ;| then . |
|00004ab0| 20 65 63 68 6f 20 73 68 | 61 72 3a 20 57 69 6c 6c | echo sh|ar: Will|
|00004ac0| 20 6e 6f 74 20 6f 76 65 | 72 2d 77 72 69 74 65 20 | not ove|r-write |
|00004ad0| 65 78 69 73 74 69 6e 67 | 20 66 69 6c 65 20 5c 22 |existing| file \"|
|00004ae0| 44 75 6e 67 65 6f 6e 2f | 43 72 65 61 74 75 72 65 |Dungeon/|Creature|
|00004af0| 5c 22 0a 65 6c 73 65 0a | 65 63 68 6f 20 73 68 61 |\".else.|echo sha|
|00004b00| 72 3a 20 45 78 74 72 61 | 63 74 69 6e 67 20 5c 22 |r: Extra|cting \"|
|00004b10| 44 75 6e 67 65 6f 6e 2f | 43 72 65 61 74 75 72 65 |Dungeon/|Creature|
|00004b20| 5c 22 20 5c 28 32 34 31 | 20 63 68 61 72 61 63 74 |\" \(241| charact|
|00004b30| 65 72 73 5c 29 0a 73 65 | 64 20 22 73 2f 5e 58 2f |ers\).se|d "s/^X/|
|00004b40| 2f 22 20 3e 44 75 6e 67 | 65 6f 6e 2f 43 72 65 61 |/" >Dung|eon/Crea|
|00004b50| 74 75 72 65 20 3c 3c 27 | 45 4e 44 5f 4f 46 5f 44 |ture <<'|END_OF_D|
|00004b60| 75 6e 67 65 6f 6e 2f 43 | 72 65 61 74 75 72 65 27 |ungeon/C|reature'|
|00004b70| 0a 58 0a 58 41 20 4d 6f | 6e 73 74 65 72 20 2e 2e |.X.XA Mo|nster ..|
|00004b80| 2e 0a 58 5c 74 0a 58 73 | 75 62 74 61 62 6c 65 20 |..X\t.Xs|ubtable |
|00004b90| 6d 6f 6e 73 74 65 72 20 | 31 20 31 30 30 0a 58 0a |monster |1 100.X.|
|00004ba0| 58 5c 74 0a 58 41 74 74 | 72 69 62 75 74 65 73 3a |X\t.XAtt|ributes:|
|00004bb0| 0a 58 5c 74 0a 58 73 74 | 61 74 20 53 74 72 65 6e |.X\t.Xst|at Stren|
|00004bc0| 67 74 68 20 32 20 32 30 | 0a 58 5c 74 0a 58 73 74 |gth 2 20|.X\t.Xst|
|00004bd0| 61 74 20 49 6e 74 65 6c | 6c 69 67 65 6e 63 65 20 |at Intel|ligence |
|00004be0| 33 20 36 0a 58 0a 58 5c | 74 0a 58 5c 74 0a 58 5c |3 6.X.X\|t.X\t.X\|
|00004bf0| 74 0a 58 73 74 61 74 20 | 44 65 78 74 65 72 69 74 |t.Xstat |Dexterit|
|00004c00| 79 20 33 20 36 0a 58 5c | 74 0a 58 73 74 61 74 20 |y 3 6.X\|t.Xstat |
|00004c10| 43 6f 6e 73 74 69 74 75 | 74 69 6f 6e 20 33 20 31 |Constitu|tion 3 1|
|00004c20| 32 0a 58 0a 58 5c 74 0a | 58 50 6f 73 73 65 73 73 |2.X.X\t.|XPossess|
|00004c30| 69 6f 6e 73 3a 0a 58 5c | 74 0a 58 73 75 62 74 61 |ions:.X\|t.Xsubta|
|00004c40| 62 6c 65 20 74 72 65 61 | 73 75 72 65 20 31 20 31 |ble trea|sure 1 1|
|00004c50| 30 30 0a 58 0a 58 5c 74 | 0a 58 57 65 61 70 6f 6e |00.X.X\t|.XWeapon|
|00004c60| 3a 0a 58 5c 74 0a 58 73 | 75 62 74 61 62 6c 65 20 |:.X\t.Xs|ubtable |
|00004c70| 77 65 61 70 6f 6e 20 31 | 20 31 30 30 0a 58 0a 45 |weapon 1| 100.X.E|
|00004c80| 4e 44 5f 4f 46 5f 44 75 | 6e 67 65 6f 6e 2f 43 72 |ND_OF_Du|ngeon/Cr|
|00004c90| 65 61 74 75 72 65 0a 69 | 66 20 74 65 73 74 20 32 |eature.i|f test 2|
|00004ca0| 34 31 20 2d 6e 65 20 60 | 77 63 20 2d 63 20 3c 44 |41 -ne `|wc -c <D|
|00004cb0| 75 6e 67 65 6f 6e 2f 43 | 72 65 61 74 75 72 65 60 |ungeon/C|reature`|
|00004cc0| 3b 20 74 68 65 6e 0a 20 | 20 20 20 65 63 68 6f 20 |; then. | echo |
|00004cd0| 73 68 61 72 3a 20 5c 22 | 44 75 6e 67 65 6f 6e 2f |shar: \"|Dungeon/|
|00004ce0| 43 72 65 61 74 75 72 65 | 5c 22 20 75 6e 70 61 63 |Creature|\" unpac|
|00004cf0| 6b 65 64 20 77 69 74 68 | 20 77 72 6f 6e 67 20 73 |ked with| wrong s|
|00004d00| 69 7a 65 21 0a 66 69 0a | 23 20 65 6e 64 20 6f 66 |ize!.fi.|# end of|
|00004d10| 20 6f 76 65 72 77 72 69 | 74 69 6e 67 20 63 68 65 | overwri|ting che|
|00004d20| 63 6b 0a 66 69 0a 69 66 | 20 74 65 73 74 20 2d 66 |ck.fi.if| test -f|
|00004d30| 20 44 75 6e 67 65 6f 6e | 2f 44 6f 6f 72 20 2d 61 | Dungeon|/Door -a|
|00004d40| 20 22 24 7b 31 7d 22 20 | 21 3d 20 22 2d 63 22 20 | "${1}" |!= "-c" |
|00004d50| 3b 20 74 68 65 6e 20 0a | 20 20 65 63 68 6f 20 73 |; then .| echo s|
|00004d60| 68 61 72 3a 20 57 69 6c | 6c 20 6e 6f 74 20 6f 76 |har: Wil|l not ov|
|00004d70| 65 72 2d 77 72 69 74 65 | 20 65 78 69 73 74 69 6e |er-write| existin|
|00004d80| 67 20 66 69 6c 65 20 5c | 22 44 75 6e 67 65 6f 6e |g file \|"Dungeon|
|00004d90| 2f 44 6f 6f 72 5c 22 0a | 65 6c 73 65 0a 65 63 68 |/Door\".|else.ech|
|00004da0| 6f 20 73 68 61 72 3a 20 | 45 78 74 72 61 63 74 69 |o shar: |Extracti|
|00004db0| 6e 67 20 5c 22 44 75 6e | 67 65 6f 6e 2f 44 6f 6f |ng \"Dun|geon/Doo|
|00004dc0| 72 5c 22 20 5c 28 39 38 | 20 63 68 61 72 61 63 74 |r\" \(98| charact|
|00004dd0| 65 72 73 5c 29 0a 73 65 | 64 20 22 73 2f 5e 58 2f |ers\).se|d "s/^X/|
|00004de0| 2f 22 20 3e 44 75 6e 67 | 65 6f 6e 2f 44 6f 6f 72 |/" >Dung|eon/Door|
|00004df0| 20 3c 3c 27 45 4e 44 5f | 4f 46 5f 44 75 6e 67 65 | <<'END_|OF_Dunge|
|00004e00| 6f 6e 2f 44 6f 6f 72 27 | 0a 58 41 20 64 6f 6f 72 |on/Door'|.XA door|
|00004e10| 20 2e 2e 2e 0a 58 5c 74 | 0a 58 49 74 20 69 73 3a | ....X\t|.XIt is:|
|00004e20| 0a 58 73 75 62 74 61 62 | 6c 65 20 74 72 61 70 20 |.Xsubtab|le trap |
|00004e30| 31 20 31 30 30 0a 58 0a | 58 5c 74 0a 58 42 65 68 |1 100.X.|X\t.XBeh|
|00004e40| 69 6e 64 20 69 74 20 77 | 69 6c 6c 20 62 65 20 66 |ind it w|ill be f|
|00004e50| 6f 75 6e 64 3a 0a 58 73 | 75 62 74 61 62 6c 65 20 |ound:.Xs|ubtable |
|00004e60| 62 65 68 69 6e 64 5f 64 | 6f 6f 72 20 31 20 31 30 |behind_d|oor 1 10|
|00004e70| 30 0a 58 0a 45 4e 44 5f | 4f 46 5f 44 75 6e 67 65 |0.X.END_|OF_Dunge|
|00004e80| 6f 6e 2f 44 6f 6f 72 0a | 69 66 20 74 65 73 74 20 |on/Door.|if test |
|00004e90| 39 38 20 2d 6e 65 20 60 | 77 63 20 2d 63 20 3c 44 |98 -ne `|wc -c <D|
|00004ea0| 75 6e 67 65 6f 6e 2f 44 | 6f 6f 72 60 3b 20 74 68 |ungeon/D|oor`; th|
|00004eb0| 65 6e 0a 20 20 20 20 65 | 63 68 6f 20 73 68 61 72 |en. e|cho shar|
|00004ec0| 3a 20 5c 22 44 75 6e 67 | 65 6f 6e 2f 44 6f 6f 72 |: \"Dung|eon/Door|
|00004ed0| 5c 22 20 75 6e 70 61 63 | 6b 65 64 20 77 69 74 68 |\" unpac|ked with|
|00004ee0| 20 77 72 6f 6e 67 20 73 | 69 7a 65 21 0a 66 69 0a | wrong s|ize!.fi.|
|00004ef0| 23 20 65 6e 64 20 6f 66 | 20 6f 76 65 72 77 72 69 |# end of| overwri|
|00004f00| 74 69 6e 67 20 63 68 65 | 63 6b 0a 66 69 0a 69 66 |ting che|ck.fi.if|
|00004f10| 20 74 65 73 74 20 2d 66 | 20 44 75 6e 67 65 6f 6e | test -f| Dungeon|
|00004f20| 2f 52 6f 6f 6d 20 2d 61 | 20 22 24 7b 31 7d 22 20 |/Room -a| "${1}" |
|00004f30| 21 3d 20 22 2d 63 22 20 | 3b 20 74 68 65 6e 20 0a |!= "-c" |; then .|
|00004f40| 20 20 65 63 68 6f 20 73 | 68 61 72 3a 20 57 69 6c | echo s|har: Wil|
|00004f50| 6c 20 6e 6f 74 20 6f 76 | 65 72 2d 77 72 69 74 65 |l not ov|er-write|
|00004f60| 20 65 78 69 73 74 69 6e | 67 20 66 69 6c 65 20 5c | existin|g file \|
|00004f70| 22 44 75 6e 67 65 6f 6e | 2f 52 6f 6f 6d 5c 22 0a |"Dungeon|/Room\".|
|00004f80| 65 6c 73 65 0a 65 63 68 | 6f 20 73 68 61 72 3a 20 |else.ech|o shar: |
|00004f90| 45 78 74 72 61 63 74 69 | 6e 67 20 5c 22 44 75 6e |Extracti|ng \"Dun|
|00004fa0| 67 65 6f 6e 2f 52 6f 6f | 6d 5c 22 20 5c 28 31 38 |geon/Roo|m\" \(18|
|00004fb0| 37 20 63 68 61 72 61 63 | 74 65 72 73 5c 29 0a 73 |7 charac|ters\).s|
|00004fc0| 65 64 20 22 73 2f 5e 58 | 2f 2f 22 20 3e 44 75 6e |ed "s/^X|//" >Dun|
|00004fd0| 67 65 6f 6e 2f 52 6f 6f | 6d 20 3c 3c 27 45 4e 44 |geon/Roo|m <<'END|
|00004fe0| 5f 4f 46 5f 44 75 6e 67 | 65 6f 6e 2f 52 6f 6f 6d |_OF_Dung|eon/Room|
|00004ff0| 27 0a 58 0a 58 41 20 52 | 6f 6f 6d 20 2e 2e 2e 0a |'.X.XA R|oom ....|
|00005000| 58 5c 74 0a 58 49 74 27 | 73 20 73 69 7a 65 20 69 |X\t.XIt'|s size i|
|00005010| 73 3a 0a 58 5c 74 0a 58 | 73 74 61 74 20 77 69 64 |s:.X\t.X|stat wid|
|00005020| 74 68 20 32 20 31 30 0a | 58 5c 74 0a 58 73 74 61 |th 2 10.|X\t.Xsta|
|00005030| 74 20 6c 65 6e 67 74 68 | 20 33 20 31 30 0a 58 0a |t length| 3 10.X.|
|00005040| 58 5c 74 0a 58 54 68 65 | 20 72 6f 6f 6d 20 69 73 |X\t.XThe| room is|
|00005050| 3a 0a 58 73 75 62 74 61 | 62 6c 65 20 74 72 61 70 |:.Xsubta|ble trap|
|00005060| 20 31 20 31 30 30 0a 58 | 0a 58 5c 74 0a 58 54 68 | 1 100.X|.X\t.XTh|
|00005070| 65 20 72 6f 6f 6d 20 68 | 61 73 3a 0a 58 73 75 62 |e room h|as:.Xsub|
|00005080| 74 61 62 6c 65 20 65 78 | 69 74 73 20 31 20 31 30 |table ex|its 1 10|
|00005090| 30 0a 58 0a 58 5c 74 0a | 58 49 74 20 63 6f 6e 74 |0.X.X\t.|XIt cont|
|000050a0| 61 69 6e 73 3a 0a 58 73 | 75 62 74 61 62 6c 65 20 |ains:.Xs|ubtable |
|000050b0| 72 6f 6f 6d 5f 63 6f 6e | 74 20 31 20 31 30 30 0a |room_con|t 1 100.|
|000050c0| 58 0a 45 4e 44 5f 4f 46 | 5f 44 75 6e 67 65 6f 6e |X.END_OF|_Dungeon|
|000050d0| 2f 52 6f 6f 6d 0a 69 66 | 20 74 65 73 74 20 31 38 |/Room.if| test 18|
|000050e0| 37 20 2d 6e 65 20 60 77 | 63 20 2d 63 20 3c 44 75 |7 -ne `w|c -c <Du|
|000050f0| 6e 67 65 6f 6e 2f 52 6f | 6f 6d 60 3b 20 74 68 65 |ngeon/Ro|om`; the|
|00005100| 6e 0a 20 20 20 20 65 63 | 68 6f 20 73 68 61 72 3a |n. ec|ho shar:|
|00005110| 20 5c 22 44 75 6e 67 65 | 6f 6e 2f 52 6f 6f 6d 5c | \"Dunge|on/Room\|
|00005120| 22 20 75 6e 70 61 63 6b | 65 64 20 77 69 74 68 20 |" unpack|ed with |
|00005130| 77 72 6f 6e 67 20 73 69 | 7a 65 21 0a 66 69 0a 23 |wrong si|ze!.fi.#|
|00005140| 20 65 6e 64 20 6f 66 20 | 6f 76 65 72 77 72 69 74 | end of |overwrit|
|00005150| 69 6e 67 20 63 68 65 63 | 6b 0a 66 69 0a 69 66 20 |ing chec|k.fi.if |
|00005160| 74 65 73 74 20 2d 66 20 | 44 75 6e 67 65 6f 6e 2f |test -f |Dungeon/|
|00005170| 62 65 68 69 6e 64 5f 64 | 6f 6f 72 20 2d 61 20 22 |behind_d|oor -a "|
|00005180| 24 7b 31 7d 22 20 21 3d | 20 22 2d 63 22 20 3b 20 |${1}" !=| "-c" ; |
|00005190| 74 68 65 6e 20 0a 20 20 | 65 63 68 6f 20 73 68 61 |then . |echo sha|
|000051a0| 72 3a 20 57 69 6c 6c 20 | 6e 6f 74 20 6f 76 65 72 |r: Will |not over|
|000051b0| 2d 77 72 69 74 65 20 65 | 78 69 73 74 69 6e 67 20 |-write e|xisting |
|000051c0| 66 69 6c 65 20 5c 22 44 | 75 6e 67 65 6f 6e 2f 62 |file \"D|ungeon/b|
|000051d0| 65 68 69 6e 64 5f 64 6f | 6f 72 5c 22 0a 65 6c 73 |ehind_do|or\".els|
|000051e0| 65 0a 65 63 68 6f 20 73 | 68 61 72 3a 20 45 78 74 |e.echo s|har: Ext|
|000051f0| 72 61 63 74 69 6e 67 20 | 5c 22 44 75 6e 67 65 6f |racting |\"Dungeo|
|00005200| 6e 2f 62 65 68 69 6e 64 | 5f 64 6f 6f 72 5c 22 20 |n/behind|_door\" |
|00005210| 5c 28 36 36 20 63 68 61 | 72 61 63 74 65 72 73 5c |\(66 cha|racters\|
|00005220| 29 0a 73 65 64 20 22 73 | 2f 5e 58 2f 2f 22 20 3e |).sed "s|/^X//" >|
|00005230| 44 75 6e 67 65 6f 6e 2f | 62 65 68 69 6e 64 5f 64 |Dungeon/|behind_d|
|00005240| 6f 6f 72 20 3c 3c 27 45 | 4e 44 5f 4f 46 5f 44 75 |oor <<'E|ND_OF_Du|
|00005250| 6e 67 65 6f 6e 2f 62 65 | 68 69 6e 64 5f 64 6f 6f |ngeon/be|hind_doo|
|00005260| 72 27 0a 58 36 35 20 74 | 61 62 6c 65 20 52 6f 6f |r'.X65 t|able Roo|
|00005270| 6d 20 30 20 30 0a 58 37 | 35 20 61 6e 20 65 6d 70 |m 0 0.X7|5 an emp|
|00005280| 74 79 20 63 6c 6f 73 65 | 74 0a 58 31 30 30 20 61 |ty close|t.X100 a|
|00005290| 20 63 6f 72 72 69 64 6f | 72 20 6c 69 6b 65 20 74 | corrido|r like t|
|000052a0| 68 65 20 72 65 73 74 0a | 45 4e 44 5f 4f 46 5f 44 |he rest.|END_OF_D|
|000052b0| 75 6e 67 65 6f 6e 2f 62 | 65 68 69 6e 64 5f 64 6f |ungeon/b|ehind_do|
|000052c0| 6f 72 0a 69 66 20 74 65 | 73 74 20 36 36 20 2d 6e |or.if te|st 66 -n|
|000052d0| 65 20 60 77 63 20 2d 63 | 20 3c 44 75 6e 67 65 6f |e `wc -c| <Dungeo|
|000052e0| 6e 2f 62 65 68 69 6e 64 | 5f 64 6f 6f 72 60 3b 20 |n/behind|_door`; |
|000052f0| 74 68 65 6e 0a 20 20 20 | 20 65 63 68 6f 20 73 68 |then. | echo sh|
|00005300| 61 72 3a 20 5c 22 44 75 | 6e 67 65 6f 6e 2f 62 65 |ar: \"Du|ngeon/be|
|00005310| 68 69 6e 64 5f 64 6f 6f | 72 5c 22 20 75 6e 70 61 |hind_doo|r\" unpa|
|00005320| 63 6b 65 64 20 77 69 74 | 68 20 77 72 6f 6e 67 20 |cked wit|h wrong |
|00005330| 73 69 7a 65 21 0a 66 69 | 0a 23 20 65 6e 64 20 6f |size!.fi|.# end o|
|00005340| 66 20 6f 76 65 72 77 72 | 69 74 69 6e 67 20 63 68 |f overwr|iting ch|
|00005350| 65 63 6b 0a 66 69 0a 69 | 66 20 74 65 73 74 20 2d |eck.fi.i|f test -|
|00005360| 66 20 44 75 6e 67 65 6f | 6e 2f 63 6f 72 72 5f 63 |f Dungeo|n/corr_c|
|00005370| 6f 6e 74 20 2d 61 20 22 | 24 7b 31 7d 22 20 21 3d |ont -a "|${1}" !=|
|00005380| 20 22 2d 63 22 20 3b 20 | 74 68 65 6e 20 0a 20 20 | "-c" ; |then . |
|00005390| 65 63 68 6f 20 73 68 61 | 72 3a 20 57 69 6c 6c 20 |echo sha|r: Will |
|000053a0| 6e 6f 74 20 6f 76 65 72 | 2d 77 72 69 74 65 20 65 |not over|-write e|
|000053b0| 78 69 73 74 69 6e 67 20 | 66 69 6c 65 20 5c 22 44 |xisting |file \"D|
|000053c0| 75 6e 67 65 6f 6e 2f 63 | 6f 72 72 5f 63 6f 6e 74 |ungeon/c|orr_cont|
|000053d0| 5c 22 0a 65 6c 73 65 0a | 65 63 68 6f 20 73 68 61 |\".else.|echo sha|
|000053e0| 72 3a 20 45 78 74 72 61 | 63 74 69 6e 67 20 5c 22 |r: Extra|cting \"|
|000053f0| 44 75 6e 67 65 6f 6e 2f | 63 6f 72 72 5f 63 6f 6e |Dungeon/|corr_con|
|00005400| 74 5c 22 20 5c 28 31 35 | 33 20 63 68 61 72 61 63 |t\" \(15|3 charac|
|00005410| 74 65 72 73 5c 29 0a 73 | 65 64 20 22 73 2f 5e 58 |ters\).s|ed "s/^X|
|00005420| 2f 2f 22 20 3e 44 75 6e | 67 65 6f 6e 2f 63 6f 72 |//" >Dun|geon/cor|
|00005430| 72 5f 63 6f 6e 74 20 3c | 3c 27 45 4e 44 5f 4f 46 |r_cont <|<'END_OF|
|00005440| 5f 44 75 6e 67 65 6f 6e | 2f 63 6f 72 72 5f 63 6f |_Dungeon|/corr_co|
|00005450| 6e 74 27 0a 58 35 20 54 | 68 65 72 65 20 69 73 20 |nt'.X5 T|here is |
|00005460| 6e 6f 74 68 69 6e 67 20 | 68 65 72 65 2e 0a 58 35 |nothing |here..X5|
|00005470| 35 20 74 61 62 6c 65 20 | 43 72 65 61 74 75 72 65 |5 table |Creature|
|00005480| 20 30 20 30 0a 58 36 30 | 20 54 68 65 72 65 20 69 | 0 0.X60| There i|
|00005490| 73 20 61 20 73 65 74 20 | 6f 66 20 73 74 61 69 72 |s a set |of stair|
|000054a0| 73 20 68 65 72 65 2e 0a | 58 36 33 20 73 75 62 74 |s here..|X63 subt|
|000054b0| 61 62 6c 65 20 74 72 61 | 70 20 31 20 31 30 30 0a |able tra|p 1 100.|
|000054c0| 58 36 39 20 54 68 65 72 | 65 20 69 73 20 61 20 74 |X69 Ther|e is a t|
|000054d0| 72 61 70 20 64 6f 6f 72 | 20 68 65 72 65 2e 0a 58 |rap door| here..X|
|000054e0| 31 30 30 20 74 61 62 6c | 65 20 44 6f 6f 72 20 30 |100 tabl|e Door 0|
|000054f0| 20 30 0a 45 4e 44 5f 4f | 46 5f 44 75 6e 67 65 6f | 0.END_O|F_Dungeo|
|00005500| 6e 2f 63 6f 72 72 5f 63 | 6f 6e 74 0a 69 66 20 74 |n/corr_c|ont.if t|
|00005510| 65 73 74 20 31 35 33 20 | 2d 6e 65 20 60 77 63 20 |est 153 |-ne `wc |
|00005520| 2d 63 20 3c 44 75 6e 67 | 65 6f 6e 2f 63 6f 72 72 |-c <Dung|eon/corr|
|00005530| 5f 63 6f 6e 74 60 3b 20 | 74 68 65 6e 0a 20 20 20 |_cont`; |then. |
|00005540| 20 65 63 68 6f 20 73 68 | 61 72 3a 20 5c 22 44 75 | echo sh|ar: \"Du|
|00005550| 6e 67 65 6f 6e 2f 63 6f | 72 72 5f 63 6f 6e 74 5c |ngeon/co|rr_cont\|
|00005560| 22 20 75 6e 70 61 63 6b | 65 64 20 77 69 74 68 20 |" unpack|ed with |
|00005570| 77 72 6f 6e 67 20 73 69 | 7a 65 21 0a 66 69 0a 23 |wrong si|ze!.fi.#|
|00005580| 20 65 6e 64 20 6f 66 20 | 6f 76 65 72 77 72 69 74 | end of |overwrit|
|00005590| 69 6e 67 20 63 68 65 63 | 6b 0a 66 69 0a 69 66 20 |ing chec|k.fi.if |
|000055a0| 74 65 73 74 20 2d 66 20 | 44 75 6e 67 65 6f 6e 2f |test -f |Dungeon/|
|000055b0| 63 6f 72 72 5f 73 65 63 | 74 20 2d 61 20 22 24 7b |corr_sec|t -a "${|
|000055c0| 31 7d 22 20 21 3d 20 22 | 2d 63 22 20 3b 20 74 68 |1}" != "|-c" ; th|
|000055d0| 65 6e 20 0a 20 20 65 63 | 68 6f 20 73 68 61 72 3a |en . ec|ho shar:|
|000055e0| 20 57 69 6c 6c 20 6e 6f | 74 20 6f 76 65 72 2d 77 | Will no|t over-w|
|000055f0| 72 69 74 65 20 65 78 69 | 73 74 69 6e 67 20 66 69 |rite exi|sting fi|
|00005600| 6c 65 20 5c 22 44 75 6e | 67 65 6f 6e 2f 63 6f 72 |le \"Dun|geon/cor|
|00005610| 72 5f 73 65 63 74 5c 22 | 0a 65 6c 73 65 0a 65 63 |r_sect\"|.else.ec|
|00005620| 68 6f 20 73 68 61 72 3a | 20 45 78 74 72 61 63 74 |ho shar:| Extract|
|00005630| 69 6e 67 20 5c 22 44 75 | 6e 67 65 6f 6e 2f 63 6f |ing \"Du|ngeon/co|
|00005640| 72 72 5f 73 65 63 74 5c | 22 20 5c 28 33 31 33 20 |rr_sect\|" \(313 |
|00005650| 63 68 61 72 61 63 74 65 | 72 73 5c 29 0a 73 65 64 |characte|rs\).sed|
|00005660| 20 22 73 2f 5e 58 2f 2f | 22 20 3e 44 75 6e 67 65 | "s/^X//|" >Dunge|
|00005670| 6f 6e 2f 63 6f 72 72 5f | 73 65 63 74 20 3c 3c 27 |on/corr_|sect <<'|
|00005680| 45 4e 44 5f 4f 46 5f 44 | 75 6e 67 65 6f 6e 2f 63 |END_OF_D|ungeon/c|
|00005690| 6f 72 72 5f 73 65 63 74 | 27 0a 58 32 35 20 43 6f |orr_sect|'.X25 Co|
|000056a0| 72 72 69 64 6f 72 20 63 | 6f 6e 74 69 6e 75 65 73 |rridor c|ontinues|
|000056b0| 20 73 74 72 61 69 67 68 | 74 0a 58 32 39 20 43 6f | straigh|t.X29 Co|
|000056c0| 72 72 69 64 6f 72 20 63 | 6f 6e 74 69 6e 75 65 73 |rridor c|ontinues|
|000056d0| 20 73 74 72 61 69 67 68 | 74 2c 20 6e 61 72 72 6f | straigh|t, narro|
|000056e0| 77 73 0a 58 36 30 20 43 | 6f 72 72 69 64 6f 72 20 |ws.X60 C|orridor |
|000056f0| 63 6f 6e 74 69 6e 75 65 | 73 20 73 74 72 61 69 67 |continue|s straig|
|00005700| 68 74 2c 20 77 69 64 65 | 6e 73 0a 58 36 38 20 43 |ht, wide|ns.X68 C|
|00005710| 6f 72 72 69 64 6f 72 20 | 74 75 72 6e 73 20 6c 65 |orridor |turns le|
|00005720| 66 74 0a 58 37 36 20 43 | 6f 72 72 69 64 6f 72 20 |ft.X76 C|orridor |
|00005730| 74 75 72 6e 73 20 72 69 | 67 68 74 0a 58 38 31 20 |turns ri|ght.X81 |
|00005740| 43 6f 72 72 69 64 6f 72 | 20 65 6e 74 65 72 73 20 |Corridor| enters |
|00005750| 66 72 6f 6d 20 6c 65 66 | 74 0a 58 38 36 20 43 6f |from lef|t.X86 Co|
|00005760| 72 72 69 64 6f 72 20 65 | 6e 74 65 72 73 20 66 72 |rridor e|nters fr|
|00005770| 6f 6d 20 72 69 67 68 74 | 0a 58 39 32 20 43 6f 72 |om right|.X92 Cor|
|00005780| 72 69 64 6f 72 20 63 72 | 65 61 74 65 73 20 27 54 |ridor cr|eates 'T|
|00005790| 27 20 69 6e 74 65 72 73 | 65 63 74 69 6f 6e 0a 58 |' inters|ection.X|
|000057a0| 39 37 20 43 6f 72 72 69 | 64 6f 72 20 63 72 65 61 |97 Corri|dor crea|
|000057b0| 74 65 73 20 27 2b 27 20 | 69 6e 74 65 72 73 65 63 |tes '+' |intersec|
|000057c0| 74 69 6f 6e 0a 58 31 30 | 30 20 43 6f 72 72 69 64 |tion.X10|0 Corrid|
|000057d0| 6f 72 20 44 65 61 64 20 | 45 6e 64 73 0a 45 4e 44 |or Dead |Ends.END|
|000057e0| 5f 4f 46 5f 44 75 6e 67 | 65 6f 6e 2f 63 6f 72 72 |_OF_Dung|eon/corr|
|000057f0| 5f 73 65 63 74 0a 69 66 | 20 74 65 73 74 20 33 31 |_sect.if| test 31|
|00005800| 33 20 2d 6e 65 20 60 77 | 63 20 2d 63 20 3c 44 75 |3 -ne `w|c -c <Du|
|00005810| 6e 67 65 6f 6e 2f 63 6f | 72 72 5f 73 65 63 74 60 |ngeon/co|rr_sect`|
|00005820| 3b 20 74 68 65 6e 0a 20 | 20 20 20 65 63 68 6f 20 |; then. | echo |
|00005830| 73 68 61 72 3a 20 5c 22 | 44 75 6e 67 65 6f 6e 2f |shar: \"|Dungeon/|
|00005840| 63 6f 72 72 5f 73 65 63 | 74 5c 22 20 75 6e 70 61 |corr_sec|t\" unpa|
|00005850| 63 6b 65 64 20 77 69 74 | 68 20 77 72 6f 6e 67 20 |cked wit|h wrong |
|00005860| 73 69 7a 65 21 0a 66 69 | 0a 23 20 65 6e 64 20 6f |size!.fi|.# end o|
|00005870| 66 20 6f 76 65 72 77 72 | 69 74 69 6e 67 20 63 68 |f overwr|iting ch|
|00005880| 65 63 6b 0a 66 69 0a 69 | 66 20 74 65 73 74 20 2d |eck.fi.i|f test -|
|00005890| 66 20 44 75 6e 67 65 6f | 6e 2f 65 78 69 74 73 20 |f Dungeo|n/exits |
|000058a0| 2d 61 20 22 24 7b 31 7d | 22 20 21 3d 20 22 2d 63 |-a "${1}|" != "-c|
|000058b0| 22 20 3b 20 74 68 65 6e | 20 0a 20 20 65 63 68 6f |" ; then| . echo|
|000058c0| 20 73 68 61 72 3a 20 57 | 69 6c 6c 20 6e 6f 74 20 | shar: W|ill not |
|000058d0| 6f 76 65 72 2d 77 72 69 | 74 65 20 65 78 69 73 74 |over-wri|te exist|
|000058e0| 69 6e 67 20 66 69 6c 65 | 20 5c 22 44 75 6e 67 65 |ing file| \"Dunge|
|000058f0| 6f 6e 2f 65 78 69 74 73 | 5c 22 0a 65 6c 73 65 0a |on/exits|\".else.|
|00005900| 65 63 68 6f 20 73 68 61 | 72 3a 20 45 78 74 72 61 |echo sha|r: Extra|
|00005910| 63 74 69 6e 67 20 5c 22 | 44 75 6e 67 65 6f 6e 2f |cting \"|Dungeon/|
|00005920| 65 78 69 74 73 5c 22 20 | 5c 28 31 34 35 20 63 68 |exits\" |\(145 ch|
|00005930| 61 72 61 63 74 65 72 73 | 5c 29 0a 73 65 64 20 22 |aracters|\).sed "|
|00005940| 73 2f 5e 58 2f 2f 22 20 | 3e 44 75 6e 67 65 6f 6e |s/^X//" |>Dungeon|
|00005950| 2f 65 78 69 74 73 20 3c | 3c 27 45 4e 44 5f 4f 46 |/exits <|<'END_OF|
|00005960| 5f 44 75 6e 67 65 6f 6e | 2f 65 78 69 74 73 27 0a |_Dungeon|/exits'.|
|00005970| 58 34 30 20 4e 6f 20 6f | 74 68 65 72 20 65 78 69 |X40 No o|ther exi|
|00005980| 74 73 0a 58 35 31 20 41 | 20 64 6f 6f 72 20 6f 6e |ts.X51 A| door on|
|00005990| 20 6f 70 70 6f 73 69 74 | 65 20 77 61 6c 6c 0a 58 | opposit|e wall.X|
|000059a0| 36 32 20 41 20 64 6f 6f | 72 20 6f 6e 20 6c 65 66 |62 A doo|r on lef|
|000059b0| 74 20 77 61 6c 6c 0a 58 | 37 33 20 41 20 64 6f 6f |t wall.X|73 A doo|
|000059c0| 72 20 6f 6e 20 72 69 67 | 68 74 20 77 61 6c 6c 0a |r on rig|ht wall.|
|000059d0| 58 38 32 20 41 20 64 6f | 6f 72 20 6f 6e 20 74 77 |X82 A do|or on tw|
|000059e0| 6f 20 6f 74 68 65 72 20 | 77 61 6c 6c 73 0a 58 31 |o other |walls.X1|
|000059f0| 30 30 20 41 20 64 6f 6f | 72 20 6f 6e 20 65 61 63 |00 A doo|r on eac|
|00005a00| 68 20 77 61 6c 6c 0a 45 | 4e 44 5f 4f 46 5f 44 75 |h wall.E|ND_OF_Du|
|00005a10| 6e 67 65 6f 6e 2f 65 78 | 69 74 73 0a 69 66 20 74 |ngeon/ex|its.if t|
|00005a20| 65 73 74 20 31 34 35 20 | 2d 6e 65 20 60 77 63 20 |est 145 |-ne `wc |
|00005a30| 2d 63 20 3c 44 75 6e 67 | 65 6f 6e 2f 65 78 69 74 |-c <Dung|eon/exit|
|00005a40| 73 60 3b 20 74 68 65 6e | 0a 20 20 20 20 65 63 68 |s`; then|. ech|
|00005a50| 6f 20 73 68 61 72 3a 20 | 5c 22 44 75 6e 67 65 6f |o shar: |\"Dungeo|
|00005a60| 6e 2f 65 78 69 74 73 5c | 22 20 75 6e 70 61 63 6b |n/exits\|" unpack|
|00005a70| 65 64 20 77 69 74 68 20 | 77 72 6f 6e 67 20 73 69 |ed with |wrong si|
|00005a80| 7a 65 21 0a 66 69 0a 23 | 20 65 6e 64 20 6f 66 20 |ze!.fi.#| end of |
|00005a90| 6f 76 65 72 77 72 69 74 | 69 6e 67 20 63 68 65 63 |overwrit|ing chec|
|00005aa0| 6b 0a 66 69 0a 69 66 20 | 74 65 73 74 20 2d 66 20 |k.fi.if |test -f |
|00005ab0| 44 75 6e 67 65 6f 6e 2f | 6a 65 77 65 6c 20 2d 61 |Dungeon/|jewel -a|
|00005ac0| 20 22 24 7b 31 7d 22 20 | 21 3d 20 22 2d 63 22 20 | "${1}" |!= "-c" |
|00005ad0| 3b 20 74 68 65 6e 20 0a | 20 20 65 63 68 6f 20 73 |; then .| echo s|
|00005ae0| 68 61 72 3a 20 57 69 6c | 6c 20 6e 6f 74 20 6f 76 |har: Wil|l not ov|
|00005af0| 65 72 2d 77 72 69 74 65 | 20 65 78 69 73 74 69 6e |er-write| existin|
|00005b00| 67 20 66 69 6c 65 20 5c | 22 44 75 6e 67 65 6f 6e |g file \|"Dungeon|
|00005b10| 2f 6a 65 77 65 6c 5c 22 | 0a 65 6c 73 65 0a 65 63 |/jewel\"|.else.ec|
|00005b20| 68 6f 20 73 68 61 72 3a | 20 45 78 74 72 61 63 74 |ho shar:| Extract|
|00005b30| 69 6e 67 20 5c 22 44 75 | 6e 67 65 6f 6e 2f 6a 65 |ing \"Du|ngeon/je|
|00005b40| 77 65 6c 5c 22 20 5c 28 | 31 34 34 20 63 68 61 72 |wel\" \(|144 char|
|00005b50| 61 63 74 65 72 73 5c 29 | 0a 73 65 64 20 22 73 2f |acters\)|.sed "s/|
|00005b60| 5e 58 2f 2f 22 20 3e 44 | 75 6e 67 65 6f 6e 2f 6a |^X//" >D|ungeon/j|
|00005b70| 65 77 65 6c 20 3c 3c 27 | 45 4e 44 5f 4f 46 5f 44 |ewel <<'|END_OF_D|
|00005b80| 75 6e 67 65 6f 6e 2f 6a | 65 77 65 6c 27 0a 58 32 |ungeon/j|ewel'.X2|
|00005b90| 30 20 73 74 61 74 20 2a | 65 6d 65 72 61 6c 64 73 |0 stat *|emeralds|
|00005ba0| 20 33 20 32 30 0a 58 33 | 35 20 73 74 61 74 20 2a | 3 20.X3|5 stat *|
|00005bb0| 72 75 62 69 65 73 20 32 | 20 34 30 0a 58 35 30 20 |rubies 2| 40.X50 |
|00005bc0| 41 20 64 69 61 6d 6f 6e | 64 20 6e 65 63 6b 6c 61 |A diamon|d neckla|
|00005bd0| 63 65 0a 58 36 35 20 41 | 20 70 61 69 72 20 6f 66 |ce.X65 A| pair of|
|00005be0| 20 6a 65 77 65 6c 65 64 | 20 62 72 61 63 65 72 73 | jeweled| bracers|
|00005bf0| 0a 58 38 30 20 73 74 61 | 74 20 2a 64 69 61 6d 6f |.X80 sta|t *diamo|
|00005c00| 6e 64 73 20 31 20 31 32 | 0a 58 31 30 30 20 41 20 |nds 1 12|.X100 A |
|00005c10| 66 65 77 20 77 6f 72 74 | 68 6c 65 73 73 20 72 6f |few wort|hless ro|
|00005c20| 63 6b 73 0a 45 4e 44 5f | 4f 46 5f 44 75 6e 67 65 |cks.END_|OF_Dunge|
|00005c30| 6f 6e 2f 6a 65 77 65 6c | 0a 69 66 20 74 65 73 74 |on/jewel|.if test|
|00005c40| 20 31 34 34 20 2d 6e 65 | 20 60 77 63 20 2d 63 20 | 144 -ne| `wc -c |
|00005c50| 3c 44 75 6e 67 65 6f 6e | 2f 6a 65 77 65 6c 60 3b |<Dungeon|/jewel`;|
|00005c60| 20 74 68 65 6e 0a 20 20 | 20 20 65 63 68 6f 20 73 | then. | echo s|
|00005c70| 68 61 72 3a 20 5c 22 44 | 75 6e 67 65 6f 6e 2f 6a |har: \"D|ungeon/j|
|00005c80| 65 77 65 6c 5c 22 20 75 | 6e 70 61 63 6b 65 64 20 |ewel\" u|npacked |
|00005c90| 77 69 74 68 20 77 72 6f | 6e 67 20 73 69 7a 65 21 |with wro|ng size!|
|00005ca0| 0a 66 69 0a 23 20 65 6e | 64 20 6f 66 20 6f 76 65 |.fi.# en|d of ove|
|00005cb0| 72 77 72 69 74 69 6e 67 | 20 63 68 65 63 6b 0a 66 |rwriting| check.f|
|00005cc0| 69 0a 69 66 20 74 65 73 | 74 20 2d 66 20 44 75 6e |i.if tes|t -f Dun|
|00005cd0| 67 65 6f 6e 2f 6d 6f 6e | 73 74 65 72 20 2d 61 20 |geon/mon|ster -a |
|00005ce0| 22 24 7b 31 7d 22 20 21 | 3d 20 22 2d 63 22 20 3b |"${1}" !|= "-c" ;|
|00005cf0| 20 74 68 65 6e 20 0a 20 | 20 65 63 68 6f 20 73 68 | then . | echo sh|
|00005d00| 61 72 3a 20 57 69 6c 6c | 20 6e 6f 74 20 6f 76 65 |ar: Will| not ove|
|00005d10| 72 2d 77 72 69 74 65 20 | 65 78 69 73 74 69 6e 67 |r-write |existing|
|00005d20| 20 66 69 6c 65 20 5c 22 | 44 75 6e 67 65 6f 6e 2f | file \"|Dungeon/|
|00005d30| 6d 6f 6e 73 74 65 72 5c | 22 0a 65 6c 73 65 0a 65 |monster\|".else.e|
|00005d40| 63 68 6f 20 73 68 61 72 | 3a 20 45 78 74 72 61 63 |cho shar|: Extrac|
|00005d50| 74 69 6e 67 20 5c 22 44 | 75 6e 67 65 6f 6e 2f 6d |ting \"D|ungeon/m|
|00005d60| 6f 6e 73 74 65 72 5c 22 | 20 5c 28 32 30 31 20 63 |onster\"| \(201 c|
|00005d70| 68 61 72 61 63 74 65 72 | 73 5c 29 0a 73 65 64 20 |haracter|s\).sed |
|00005d80| 22 73 2f 5e 58 2f 2f 22 | 20 3e 44 75 6e 67 65 6f |"s/^X//"| >Dungeo|
|00005d90| 6e 2f 6d 6f 6e 73 74 65 | 72 20 3c 3c 27 45 4e 44 |n/monste|r <<'END|
|00005da0| 5f 4f 46 5f 44 75 6e 67 | 65 6f 6e 2f 6d 6f 6e 73 |_OF_Dung|eon/mons|
|00005db0| 74 65 72 27 0a 58 31 35 | 20 47 69 61 6e 74 20 53 |ter'.X15| Giant S|
|00005dc0| 70 69 64 65 72 0a 58 32 | 30 20 48 69 6c 6c 20 47 |pider.X2|0 Hill G|
|00005dd0| 69 61 6e 74 0a 58 32 35 | 20 4f 72 63 0a 58 32 38 |iant.X25| Orc.X28|
|00005de0| 20 45 61 72 74 68 20 45 | 6c 65 6d 65 6e 74 61 6c | Earth E|lemental|
|00005df0| 0a 58 33 37 20 73 75 62 | 74 61 62 6c 65 20 75 6e |.X37 sub|table un|
|00005e00| 64 65 61 64 20 31 20 31 | 30 30 0a 58 34 33 20 57 |dead 1 1|00.X43 W|
|00005e10| 65 72 65 77 6f 6c 66 0a | 58 34 38 20 47 72 65 6d |erewolf.|X48 Grem|
|00005e20| 6c 69 6e 0a 58 35 30 20 | 43 65 6e 74 61 75 72 0a |lin.X50 |Centaur.|
|00005e30| 58 35 38 20 44 72 61 67 | 6f 6e 0a 58 36 33 20 47 |X58 Drag|on.X63 G|
|00005e40| 6f 62 6c 69 6e 0a 58 36 | 38 20 53 61 6c 61 6d 61 |oblin.X6|8 Salama|
|00005e50| 6e 64 65 72 0a 58 37 35 | 20 47 72 69 66 66 6f 6e |nder.X75| Griffon|
|00005e60| 0a 58 38 33 20 53 68 61 | 64 6f 77 0a 58 39 32 20 |.X83 Sha|dow.X92 |
|00005e70| 46 6c 6f 61 74 69 6e 67 | 20 45 79 65 0a 58 31 30 |Floating| Eye.X10|
|00005e80| 30 20 47 69 61 6e 74 20 | 42 65 61 72 0a 45 4e 44 |0 Giant |Bear.END|
|00005e90| 5f 4f 46 5f 44 75 6e 67 | 65 6f 6e 2f 6d 6f 6e 73 |_OF_Dung|eon/mons|
|00005ea0| 74 65 72 0a 69 66 20 74 | 65 73 74 20 32 30 31 20 |ter.if t|est 201 |
|00005eb0| 2d 6e 65 20 60 77 63 20 | 2d 63 20 3c 44 75 6e 67 |-ne `wc |-c <Dung|
|00005ec0| 65 6f 6e 2f 6d 6f 6e 73 | 74 65 72 60 3b 20 74 68 |eon/mons|ter`; th|
|00005ed0| 65 6e 0a 20 20 20 20 65 | 63 68 6f 20 73 68 61 72 |en. e|cho shar|
|00005ee0| 3a 20 5c 22 44 75 6e 67 | 65 6f 6e 2f 6d 6f 6e 73 |: \"Dung|eon/mons|
|00005ef0| 74 65 72 5c 22 20 75 6e | 70 61 63 6b 65 64 20 77 |ter\" un|packed w|
|00005f00| 69 74 68 20 77 72 6f 6e | 67 20 73 69 7a 65 21 0a |ith wron|g size!.|
|00005f10| 66 69 0a 23 20 65 6e 64 | 20 6f 66 20 6f 76 65 72 |fi.# end| of over|
|00005f20| 77 72 69 74 69 6e 67 20 | 63 68 65 63 6b 0a 66 69 |writing |check.fi|
|00005f30| 0a 69 66 20 74 65 73 74 | 20 2d 66 20 44 75 6e 67 |.if test| -f Dung|
|00005f40| 65 6f 6e 2f 72 6f 6f 6d | 5f 63 6f 6e 74 20 2d 61 |eon/room|_cont -a|
|00005f50| 20 22 24 7b 31 7d 22 20 | 21 3d 20 22 2d 63 22 20 | "${1}" |!= "-c" |
|00005f60| 3b 20 74 68 65 6e 20 0a | 20 20 65 63 68 6f 20 73 |; then .| echo s|
|00005f70| 68 61 72 3a 20 57 69 6c | 6c 20 6e 6f 74 20 6f 76 |har: Wil|l not ov|
|00005f80| 65 72 2d 77 72 69 74 65 | 20 65 78 69 73 74 69 6e |er-write| existin|
|00005f90| 67 20 66 69 6c 65 20 5c | 22 44 75 6e 67 65 6f 6e |g file \|"Dungeon|
|00005fa0| 2f 72 6f 6f 6d 5f 63 6f | 6e 74 5c 22 0a 65 6c 73 |/room_co|nt\".els|
|00005fb0| 65 0a 65 63 68 6f 20 73 | 68 61 72 3a 20 45 78 74 |e.echo s|har: Ext|
|00005fc0| 72 61 63 74 69 6e 67 20 | 5c 22 44 75 6e 67 65 6f |racting |\"Dungeo|
|00005fd0| 6e 2f 72 6f 6f 6d 5f 63 | 6f 6e 74 5c 22 20 5c 28 |n/room_c|ont\" \(|
|00005fe0| 36 31 20 63 68 61 72 61 | 63 74 65 72 73 5c 29 0a |61 chara|cters\).|
|00005ff0| 73 65 64 20 22 73 2f 5e | 58 2f 2f 22 20 3e 44 75 |sed "s/^|X//" >Du|
|00006000| 6e 67 65 6f 6e 2f 72 6f | 6f 6d 5f 63 6f 6e 74 20 |ngeon/ro|om_cont |
|00006010| 3c 3c 27 45 4e 44 5f 4f | 46 5f 44 75 6e 67 65 6f |<<'END_O|F_Dungeo|
|00006020| 6e 2f 72 6f 6f 6d 5f 63 | 6f 6e 74 27 0a 58 33 30 |n/room_c|ont'.X30|
|00006030| 20 6e 6f 74 68 69 6e 67 | 0a 58 36 35 20 74 61 62 | nothing|.X65 tab|
|00006040| 6c 65 20 43 72 65 61 74 | 75 72 65 20 30 20 30 0a |le Creat|ure 0 0.|
|00006050| 58 31 30 30 20 73 75 62 | 74 61 62 6c 65 20 74 72 |X100 sub|table tr|
|00006060| 65 61 73 75 72 65 20 31 | 20 31 30 30 0a 45 4e 44 |easure 1| 100.END|
|00006070| 5f 4f 46 5f 44 75 6e 67 | 65 6f 6e 2f 72 6f 6f 6d |_OF_Dung|eon/room|
|00006080| 5f 63 6f 6e 74 0a 69 66 | 20 74 65 73 74 20 36 31 |_cont.if| test 61|
|00006090| 20 2d 6e 65 20 60 77 63 | 20 2d 63 20 3c 44 75 6e | -ne `wc| -c <Dun|
|000060a0| 67 65 6f 6e 2f 72 6f 6f | 6d 5f 63 6f 6e 74 60 3b |geon/roo|m_cont`;|
|000060b0| 20 74 68 65 6e 0a 20 20 | 20 20 65 63 68 6f 20 73 | then. | echo s|
|000060c0| 68 61 72 3a 20 5c 22 44 | 75 6e 67 65 6f 6e 2f 72 |har: \"D|ungeon/r|
|000060d0| 6f 6f 6d 5f 63 6f 6e 74 | 5c 22 20 75 6e 70 61 63 |oom_cont|\" unpac|
|000060e0| 6b 65 64 20 77 69 74 68 | 20 77 72 6f 6e 67 20 73 |ked with| wrong s|
|000060f0| 69 7a 65 21 0a 66 69 0a | 23 20 65 6e 64 20 6f 66 |ize!.fi.|# end of|
|00006100| 20 6f 76 65 72 77 72 69 | 74 69 6e 67 20 63 68 65 | overwri|ting che|
|00006110| 63 6b 0a 66 69 0a 69 66 | 20 74 65 73 74 20 2d 66 |ck.fi.if| test -f|
|00006120| 20 44 75 6e 67 65 6f 6e | 2f 74 72 61 70 20 2d 61 | Dungeon|/trap -a|
|00006130| 20 22 24 7b 31 7d 22 20 | 21 3d 20 22 2d 63 22 20 | "${1}" |!= "-c" |
|00006140| 3b 20 74 68 65 6e 20 0a | 20 20 65 63 68 6f 20 73 |; then .| echo s|
|00006150| 68 61 72 3a 20 57 69 6c | 6c 20 6e 6f 74 20 6f 76 |har: Wil|l not ov|
|00006160| 65 72 2d 77 72 69 74 65 | 20 65 78 69 73 74 69 6e |er-write| existin|
|00006170| 67 20 66 69 6c 65 20 5c | 22 44 75 6e 67 65 6f 6e |g file \|"Dungeon|
|00006180| 2f 74 72 61 70 5c 22 0a | 65 6c 73 65 0a 65 63 68 |/trap\".|else.ech|
|00006190| 6f 20 73 68 61 72 3a 20 | 45 78 74 72 61 63 74 69 |o shar: |Extracti|
|000061a0| 6e 67 20 5c 22 44 75 6e | 67 65 6f 6e 2f 74 72 61 |ng \"Dun|geon/tra|
|000061b0| 70 5c 22 20 5c 28 31 32 | 34 20 63 68 61 72 61 63 |p\" \(12|4 charac|
|000061c0| 74 65 72 73 5c 29 0a 73 | 65 64 20 22 73 2f 5e 58 |ters\).s|ed "s/^X|
|000061d0| 2f 2f 22 20 3e 44 75 6e | 67 65 6f 6e 2f 74 72 61 |//" >Dun|geon/tra|
|000061e0| 70 20 3c 3c 27 45 4e 44 | 5f 4f 46 5f 44 75 6e 67 |p <<'END|_OF_Dung|
|000061f0| 65 6f 6e 2f 74 72 61 70 | 27 0a 58 32 34 20 6e 65 |eon/trap|'.X24 ne|
|00006200| 65 64 6c 65 20 74 72 61 | 70 70 65 64 0a 58 34 35 |edle tra|pped.X45|
|00006210| 20 70 6f 69 73 6f 6e 6f | 75 73 20 67 61 73 20 74 | poisono|us gas t|
|00006220| 72 61 70 70 65 64 0a 58 | 35 33 20 73 6c 65 65 70 |rapped.X|53 sleep|
|00006230| 20 67 61 73 20 74 72 61 | 70 70 65 64 0a 58 36 30 | gas tra|pped.X60|
|00006240| 20 63 72 6f 73 73 62 6f | 77 20 74 72 61 70 70 65 | crossbo|w trappe|
|00006250| 64 0a 58 37 35 20 65 6c | 65 63 74 72 69 63 61 6c |d.X75 el|ectrical|
|00006260| 6c 79 20 74 72 61 70 70 | 65 64 0a 58 31 30 30 20 |ly trapp|ed.X100 |
|00006270| 6e 6f 74 20 74 72 61 70 | 70 65 64 0a 45 4e 44 5f |not trap|ped.END_|
|00006280| 4f 46 5f 44 75 6e 67 65 | 6f 6e 2f 74 72 61 70 0a |OF_Dunge|on/trap.|
|00006290| 69 66 20 74 65 73 74 20 | 31 32 34 20 2d 6e 65 20 |if test |124 -ne |
|000062a0| 60 77 63 20 2d 63 20 3c | 44 75 6e 67 65 6f 6e 2f |`wc -c <|Dungeon/|
|000062b0| 74 72 61 70 60 3b 20 74 | 68 65 6e 0a 20 20 20 20 |trap`; t|hen. |
|000062c0| 65 63 68 6f 20 73 68 61 | 72 3a 20 5c 22 44 75 6e |echo sha|r: \"Dun|
|000062d0| 67 65 6f 6e 2f 74 72 61 | 70 5c 22 20 75 6e 70 61 |geon/tra|p\" unpa|
|000062e0| 63 6b 65 64 20 77 69 74 | 68 20 77 72 6f 6e 67 20 |cked wit|h wrong |
|000062f0| 73 69 7a 65 21 0a 66 69 | 0a 23 20 65 6e 64 20 6f |size!.fi|.# end o|
|00006300| 66 20 6f 76 65 72 77 72 | 69 74 69 6e 67 20 63 68 |f overwr|iting ch|
|00006310| 65 63 6b 0a 66 69 0a 69 | 66 20 74 65 73 74 20 2d |eck.fi.i|f test -|
|00006320| 66 20 44 75 6e 67 65 6f | 6e 2f 74 72 65 61 73 75 |f Dungeo|n/treasu|
|00006330| 72 65 20 2d 61 20 22 24 | 7b 31 7d 22 20 21 3d 20 |re -a "$|{1}" != |
|00006340| 22 2d 63 22 20 3b 20 74 | 68 65 6e 20 0a 20 20 65 |"-c" ; t|hen . e|
|00006350| 63 68 6f 20 73 68 61 72 | 3a 20 57 69 6c 6c 20 6e |cho shar|: Will n|
|00006360| 6f 74 20 6f 76 65 72 2d | 77 72 69 74 65 20 65 78 |ot over-|write ex|
|00006370| 69 73 74 69 6e 67 20 66 | 69 6c 65 20 5c 22 44 75 |isting f|ile \"Du|
|00006380| 6e 67 65 6f 6e 2f 74 72 | 65 61 73 75 72 65 5c 22 |ngeon/tr|easure\"|
|00006390| 0a 65 6c 73 65 0a 65 63 | 68 6f 20 73 68 61 72 3a |.else.ec|ho shar:|
|000063a0| 20 45 78 74 72 61 63 74 | 69 6e 67 20 5c 22 44 75 | Extract|ing \"Du|
|000063b0| 6e 67 65 6f 6e 2f 74 72 | 65 61 73 75 72 65 5c 22 |ngeon/tr|easure\"|
|000063c0| 20 5c 28 38 37 20 63 68 | 61 72 61 63 74 65 72 73 | \(87 ch|aracters|
|000063d0| 5c 29 0a 73 65 64 20 22 | 73 2f 5e 58 2f 2f 22 20 |\).sed "|s/^X//" |
|000063e0| 3e 44 75 6e 67 65 6f 6e | 2f 74 72 65 61 73 75 72 |>Dungeon|/treasur|
|000063f0| 65 20 3c 3c 27 45 4e 44 | 5f 4f 46 5f 44 75 6e 67 |e <<'END|_OF_Dung|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.