home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sources / games / 165 < prev    next >
Encoding:
Internet Message Format  |  1992-08-20  |  56.4 KB

  1. Path: sparky!uunet!zephyr.ens.tek.com!master!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v14i035:  umoria4 - single player dungeon simulation (ver. 5.5), Part03/39
  5. Message-ID: <3393@master.CNA.TEK.COM>
  6. Date: 20 Aug 92 18:02:22 GMT
  7. Sender: news@master.CNA.TEK.COM
  8. Lines: 1108
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: grabiner@math.harvard.edu (David Grabiner)
  12. Posting-number: Volume 14, Issue 35
  13. Archive-name: umoria4/Part03
  14. Supersedes: umoria3: Volume 9, Issue 55-97; Volume 10, Issue 15-17
  15. Environment: Curses, Unix, Mac, MS-DOS, Atari-ST, Amiga, VMS
  16.  
  17.  
  18.  
  19. #! /bin/sh
  20. # This is a shell archive.  Remove anything before this line, then unpack
  21. # it by saving it into a file and typing "sh file".  To overwrite existing
  22. # files, type "sh file -c".  You can also feed this as standard input via
  23. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  24. # will see the following message at the end:
  25. #        "End of archive 3 (of 39)."
  26. # Contents:  OChanges source/misc4.c
  27. # Wrapped by billr@saab on Thu Aug 20 09:11:26 1992
  28. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  29. if test -f 'OChanges' -a "${1}" != "-c" ; then 
  30.   echo shar: Will not clobber existing file \"'OChanges'\"
  31. else
  32. echo shar: Extracting \"'OChanges'\" \(51602 characters\)
  33. sed "s/^X//" >'OChanges' <<'END_OF_FILE'
  34. X::::::: 1990 ::::::::
  35. X------------ 1/1
  36. Xcreatures.c: in mon_cast_spell(), must update_mon() to light monsters before
  37. X    they cast a spell
  38. X------------- 1/2
  39. Xmoria1.c: inven_command(), could not wear item which replaced equip item if
  40. X    inven full, only fail if inven_check_num fails for torches
  41. Xmisc2.c: change spacing for stats on change_character page, was printing in
  42. X    last column for max stat
  43. Xmoria2.c: tunnel(), if no shovel/pick, divide total tabil chance by two
  44. Xmonsters.c: change eye-sight and sleep values for consistency, as noted by
  45. X    djgrabin
  46. Xhelp.c: change the monster recall so that it lists high level monsters first
  47. Xcreature.c: when monster bashes down a door, call disturb() to halt resting
  48. Xio.c: fix msg_print() so that -more- is always printed on screen, fix
  49. X    put_buffer() so that does not fail if col argument greater than 79/80
  50. Xmisc1.c: change chance for ego weapons/missiles to 3*special/2 instead of
  51. X    just special, needed because treasure distribution change has made
  52. X    ego weapons not as common as before
  53. X--------- 1/11
  54. Xmonsters.c: let nether wraith phase, set Black/Red/Multi ancient dragons
  55. X    to a sleep value of 700
  56. Xcreature.c: increase r_attacks if either notice true or r_attacks is
  57. X    nonzero (i.e. it has been noticed before)
  58. Xmoria2.c: move_char(), when step back after setting off a falling rock trap,
  59. X    check to see if have stepped back onto another trap
  60. Xmoria1.c: inven_command(), when restart it after taking off an item, don't
  61. X    print the 'have to drop something' message because that is confusing
  62. Xmisc2.c: modify_stat(), could overflow 118 when increasing stats, add extra
  63. X    case to enforce max of 118
  64. X--------- 1/12
  65. Xall: apply william setzer's objdes() diffs, 500K patch file, change version
  66. X    number to 5.0.10 and distribute
  67. Xdesc.c, misc2.c, store1.c: remove several obsolete uses of index(),
  68. X    insert_num() no longer used anywhere
  69. Xconstant.h, desc.c: change ID_TRIED,ID_KNOWN1 to OD_TRIED,OD_KNOWN1
  70. Xdesc.c: eliminate titles[], rename title_space[] to titles[]
  71. Xall: fixed lint errors
  72. Xall: make sure that all objdes() strings are bigvtype
  73. Xdesc.c: fix printing of bows/arrows/picks, needed new p1_use define, and
  74. X    rearrange code in objdes() switch statement
  75. Xtreasur1.c, treasur2.c: remove -100 tohit from books, was being printed, and
  76. X    is silly anyways
  77. Xconstant.h, externs.h, save.c, treasur2.c: change object_ident[] from
  78. X    MAX_OBJECTS to OBJECT_IDENT_SIZE = 7*64, see object_offset() in desc.c
  79. X    to see why this is necessary
  80. X---------- 1/13
  81. Xexterns.h, misc2.c, store1.c: deleted obsolete references to treasure_type
  82. Xdesc.c: always print toac field if known2 and non-negative
  83. Xconfig.h, io.c, misc1.c: eliminated BUGGY_CURSES define, caused too much
  84. X    trouble, just assume that can never print in last column of screen
  85. Xconstant.h, desc.c, misc1.c, moria2.c, spells.c, treasur1.c, types.h:
  86. X    created special_names table to hold all possible name2 strings,
  87. X    name2 changed to an int8u which holds index to special_names table
  88. Xexterns.h, main.c, treasure1.c: sort_objects() function deleted, sorting now
  89. X    done by init_t_level using O(n) bin sort, into sorted_objects[] array
  90. Xfiles.c, misc2.c: object_list[] references that assumed it was sorted now
  91. X    indirect through sorted_objects[] array
  92. Xmain.c, variable.c: player_init indexes now point into object_list instead
  93. X    of inventory_init
  94. X------- 1/14
  95. Xconstant.h, externs.h, main.c, store1.c, treasur1.c, treasur2.c, variable.c:
  96. X    deleted inventory_init array, stores objects now in object_list,
  97. X    MAX_OBJECT adjusted, MAX_DUNGEON_OBJ defined, store_choice[] fixed
  98. Xall: put all objects in object_list, trap_list, door_list, store_door,
  99. X    gold_list, up_stair, down_stair, rubble, much, blank_treasure,
  100. X    scare_monster are not separate variables anymore
  101. Xall: invcopy now takes an object_list index as second parameter, name field
  102. X    deleted from inven_type and fields rearranged
  103. X----------- 1/15
  104. Xstore1.c: search_list() deleted, use i_ptr->index instead to get raw item cost
  105. Xsave.c: obsolete treasure_type references deleted, save files work again
  106. Xcreature.c, magic.c, misc2.c, prayer.c, save.c, wands.c: fixed long/short
  107. X    problems with shift, mostly change (1 << i) to (1L << i)
  108. Xall: add new register declaration, check indentation, fix 32/16bit int
  109. X    problems
  110. Xconstant.h: change version number to 5.0.11
  111. X------------- 1/17
  112. Xspells.c: aggravate was not initiallized in aggravate_monster()
  113. Xmonsters.c: novice rogue now evil like other rogues
  114. Xmisc2.c: 2 "... learn ... new spells ..." messages changed to print prayers
  115. X    instead for priests
  116. Xmoria2.c: drop_throw(), "The %s hits %s" changed to "The %s hits the %s."
  117. Xmany: fixed problems with setting of free_turn_flag
  118. X----------- 1/19
  119. Xmisc2.c: fix inven_carry(), to stack store/dungeon items properly
  120. Xdesc.c: objdes(), set p1_use = IGNORED for food and potions, changed
  121. X    is_a_vowel(tmp_val[1]) to [2]
  122. Xmoria2.c: "exceed weight limit?" message now prints item name also
  123. Xdesc.c, spells.c, staffs.c, wands.c: empty wands are not incribed empty if
  124. X    known2, empty removed when wands are recharged
  125. Xdesc.c: put spaces between inscribed words
  126. Xdungeon.c: always inscribe majik when character notices this, not just for
  127. X    inventory items as that helps priests more than fighters
  128. Xstore1.c: sell_price(), succeed only if both item->cost and item_value() are
  129. X    positive
  130. Xcreature.c: don't increase a number of attacks when monster repelled in
  131. X    make_attack(), i.e. no damage done so shouldn't learn about damage
  132. Xmoria1.c: regenhp and regenmana, could get chp/cmana equal to max and _frac
  133. X    non-zero, change c > max test to c >= max test
  134. Xconstant.h, dungeon.c, misc2.c: hp and mana were printed while in store/inv,
  135. X    fix calc_hitpoints() and calc_mana() to set flags instead of printing,
  136. X    in dungeon.c, checks flags and print values
  137. X---------- 1/20
  138. Xstore2.c: redisplay store prices if charisma changes during the inven_command
  139. X    calls (actually just redraw everything)
  140. Xmoria2.c: monster_death(), dump must be set to 0 is number is 0
  141. Xconstant.h, moria2.c, recall.c, spells.c: recall printing of treasure changed,
  142. X    instead of setting CM_ bits, store largest number of treasure ever
  143. X    generated in those 5 CM_TREASURE bits, changed monster_death() to set
  144. X    the bits the new way, changed uses of monster_death() to replace old
  145. X    treasure bits with new ones, the vague print out treasure amounts
  146. X    replace with printout of precise number of treasures generated
  147. Xexterns.h, moria2.c: monster_death() changed to int32 monster_death()
  148. Xmoria1.c: new_spot() contained line of code "i = randint(10)" that did not
  149. X    belong there, was formerly testing code
  150. Xdesc.c: objdes(), force zero charges to always print, also, always print
  151. X    digging plusses even if zero
  152. Xmain.c: items that initialize players inventory are marked store_bought(),
  153. X    this is needed so that dagger/armor bonuses will be shown for them
  154. Xdesc.c: objdes(), fixed printing of doors, known1() clear the tried flag,
  155. X    magic_init() don't let scroll names end with a blank
  156. Xmisc2.c: gain_spells(), call calc_mana() if py.misc.mana == 0, this is
  157. X    for characters who did not know any spells before the 'G' command,
  158. X    can't gain spells if blind/no light/confused
  159. Xmoria1.c: infinite loop entered with 'id' and screen_change, also, 'n' to
  160. X    the continuing with inventory prompt did not work, must clear
  161. X    doing_inven before returning from inven_command() in these cases
  162. Xdesc.c: identify(), don't merge items in equip list, only merge items that
  163. X    are single stackable
  164. Xmisc2.c: inven_carry(), inven_check_num(), fix item stacking, items can only
  165. X    stack if they are both identified or both unknown (store items are
  166. X    always identified)
  167. Xconstant.h: change version number to 5.0.12 and distribute
  168. X------------ 1/21
  169. Xdesc.c: objdes() bug, change p1_use = IGNORED to p1_use == IGNORED
  170. Xmoria2.c: move_char(), moving into a wall is no longer a free turn
  171. Xmisc2.c: gain_spells(), priests no longer need book before can learn spells
  172. X    from it, mages still need the books, calc_spells() delete unused
  173. X    var spells[], remove limit of 23 from number of new spells
  174. Xdungeon.c: made scribe_object() a free turn again
  175. Xrecall.c: only print monster speed if at least one movement flag known
  176. Xunix.c: missing */ after Gakk!! -CJS-.
  177. Xdesc.c: stacking did not work right, fixed known1_p() to return OD_KNOWN1
  178. X    instead of TRUE for store items, so that known1_p() == known1_p()
  179. X    will work consistently
  180. Xmonsters.c: creeping coins hit instead of bite, and touch instead of breath
  181. Xvariable.c: fixed problems with temple/alchemist store inventories
  182. Xdesc.c, store1.c: fixed food prices, only check unknown if subval puts it
  183. X    among the molds/mushrooms
  184. X------------- 1/24
  185. Xmisc2.c, types.h: change inscrip back to char *, fix inscribe() to malloc
  186. X    space for string, and then copy inscription into the malloced space,
  187. Xsave.c: fixed (compatibly) to write/read new inscriptions
  188. Xdesc.c: free malloced inscription space in invcopy
  189. Xdeath.c, misc1.c: delete max tcptr code
  190. Xconstant.h, desc.c, misc1.c: define new const ID_SHOW_TOHIT, in magic_treasure
  191. X    set this bit for every weapon,digging tool,missile,bow, in objdes()
  192. X    print out tohit/todam if this bit set and object identified, this
  193. X    makes it easy to tell ident weapons from unident weapons
  194. Xmain.c: char_inven_init() must set ID_SHOW_TOHIT flag for initial weapon
  195. Xdeath.c, constant.h, misc1.c: change MAX_TALLOC from 225 to 150,
  196. X    delete temporary code which printed out max tcptr values
  197. Xmisc2.c: allow inscriptions of up to 24 characters
  198. Xconstant.h: change version number to 5.0.13 and distribute
  199. X-------------- 1/26
  200. Xwizard.c: wizard_create(), initialize the name2 and inscrip fields to 0,
  201. X    init the ident field to known2 and storebought
  202. Xconstant.h: changed MAX_TITLES from 60 to 45
  203. Xdesc.c: magic_init(), wrote to a char *tmp; modified to write to a vtype
  204. X    string
  205. Xrecall.c: change printing of treasure again, only print 'sometimes' is 60% is
  206. X    only bit set, otherwise always print 'often' if only one object, for
  207. X    two objects, print 'often' only if 60% and 90% are only bits set
  208. Xscrolls.c: recharge scrolls not used up when read, fixed setting of used_up
  209. Xspells.c: res = TRUE; moved out of if-stmt so only needed once
  210. Xtreasure.c: change wiz obj name from "& wizard object" to "{wizard object}"
  211. X---------- 1/29
  212. Xmoria2.c: tunnel(), give player attack on creature if it is in the way
  213. Xmisc2.c: gain_spell(), remove limit of 22 on learning spells, fix print_spells
  214. X    so that it will only show the first 22 spells
  215. Xconstant.h, desc.c, misc1.c: change ID_SHOW_TOHIT to ID_SHOW_HITDAM, set this
  216. X    bit for gauntlet/rings of slaying, and irritation/enveloping cloaks,
  217. X    fix objdes() so that it only prints both tohit/todam if this bit is set
  218. X    otherwise, only prints one number, if either of tohit/todam nonzero
  219. Xdesc.c, treasure.c: remove "the entrance to the " from store doors and put
  220. X    in objdes() in desc.c
  221. Xmisc2.c: put_misc2(), add "Exp to Adv." to character display
  222. Xconstant.h, desc.c, misc1.c: added defines for ID_NOSHOW_P1 and ID_SHOW_P1
  223. X    to improve printing of object names, objdes() always prints p1 if
  224. X    ID_SHOW_P1 set, and never prints it if NOSHOW set, these override
  225. X    the default p1_use setting, NOSHOW added to sustain stat rings,
  226. X    SHOW added to clumsy/weak gloves, boots of speed/stealth/slowness,
  227. X    helms of int/wis/infra/might/lordliness/magi/beauty/seeing/
  228. X    stupid/dull/weak/ugly, cloaks of stealth
  229. Xcreature.c: increase effect of aggravate_monster attack from range of 5 to 20
  230. Xspells.c: dispel_creature(), prt_exp() was only called when visible creatures
  231. X    died, now always called when creature dies
  232. Xmisc1.c: added messages to compact_objects() and compact_monsters() so that
  233. X    can tell if they are ever called
  234. Xstore1.c: rings/amulets which are not known2 now have base value from object
  235. X    list instead of real value
  236. Xmoria2.c, staffs.c, wands.c: cast level to int, so that calculations will be
  237. X    done with signed arithmetic, in openobject() change chance of opening
  238. X    a chest, instead of -2*level use -level, this help eliminate chests
  239. X    which are impossible to open
  240. X--------- 1/30
  241. Xrecall.c: print ' at normal speed' for monsters with mspeed = 1
  242. X--------- 2/10
  243. Xspells.c: turn_undead, speed_monsters, sleep_monsters2, and dispel_creature
  244. X    modified so that they only affect creatures in los of player
  245. Xexterns.h, misc2.c, variable.c: new array spell_order[], holds order in which
  246. X    spells are learned, in calc_spell() spells are now remembered in
  247. X    the order that they were learned, and forgotten in the reverse order
  248. X    learned, in gain_spell() must modify spell_order when spell learned
  249. Xmain.c: spell_order initialized in inven_char_init to all 99s
  250. Xsave.c: save/restore spell_order, for patch_level <= 13 savefiles create
  251. X    a reasonable spell_order on the fly
  252. Xmisc2.c: was erasing wrong line in gain_spells, change `j+2' to `j+1'
  253. Xall: change file names to be 8.3 characters long
  254. Xconstant.h: change version number to 5.0.14 and release
  255. X---------- 2/10
  256. Xdungeon.c: change rogue-like wiz help key from ^? to \
  257. Xall: merged in Mac sources, all initialized variables are now in variable.c,
  258. X    rearranged directory structure
  259. X---------- 2/11
  260. Xall: merged in VMS sources
  261. Xchanged to 5.0.15 and distribute
  262. X--------- 2/13
  263. Xmoria2.c: carry(), printed 'worth of emeralds..' removed '.' from string
  264. Xdesc.c: crowns did not print out AC because it is zero, add special case
  265. X    to objdes() so that tval == 33 (crowns) always have AC printed out,
  266. X    change (+5 charges) to (5 charges)
  267. X----------- 2/14
  268. Xmoria2.c: inven_throw() created second copy of pointer to malloced
  269. X    inscription, it now creates new inscription for new object
  270. Xmoria1.c: inven_command(), wear option copied malloced inscription,
  271. X    create new inscription for new object
  272. Xmisc2.c: inven_destroy(), free inscription of just deleted object,
  273. X    clear inscrip pointer of last objects previous location, so that
  274. X    it will not be freed, inven_drop(), create new inscription for
  275. X    new item, inven_carry() create new inscription for new item,
  276. X    scribe_object() free space for old insription since it is deleted
  277. Xconfig.h, externs.h, misc2.c, moria1.c: rename remove() to takeoff() to
  278. X    avoid naming conflict with library routines
  279. Xexterns.h, misc2.c, store1.c: deleted join_names(), no longer doing anything
  280. X    useful, and was wrongly creating duplicate pointers to malloc blocks
  281. Xmoria2.c: make moving into walls a free turn again, but player can not attack
  282. X    invisible creatures in walls by moving into wall (hence preventing
  283. X    him from using 6 free turns to search for invis creature), must
  284. X    tunnel into wall instead, which always takes a turn
  285. Xdungeon.c, externs.h, moria2.c: pass direction to tunnel() instead of point
  286. X    digging to, eliminates a lot of duplicate code, tunnel() now checks
  287. X    confusion, and tries to tunnel in random direction if confused
  288. Xtreasure.c: clone monster wands changed from level 2 to level 15, makes them
  289. X    recharge less, max 6 new charges instead of max 18 new charges
  290. Xfiles/version.hlp: add Dan Bernstein's name to credits
  291. Xmagic.c, variable.c, wands.c: change stinking cloud from 16 to 12 damage as
  292. X    it was too close to lightning bolt at 18, reduce mana for mage/ranger
  293. X    from 4/6 to 3/5
  294. Xmoria1.c: show_inven() and show_equip(), don't print first two spaces when
  295. X    col is zero, since will blank the whole screen anyways
  296. Xmoria2.c: py_attack(), only cleared confuse_monster flag if monster survived
  297. X    attack, now always clear this flag and try to confuse monster
  298. X-------------- 2/16
  299. Xall: add in diffs to get MSDOS version working again, add files from binary
  300. X    PC-Moria distribution
  301. Xtypes.h: for PC, use 'unsigned char var : 1' to reduce sizeof cave_type
  302. X    from 5 to 4
  303. Xdesc.c, misc1.c, misc2.c, moria1.c, moria2.c, save.c, wizard.c, types.h:
  304. X    change inven_type inscrip field from pointer to an 13 char array,
  305. X    mallocing storage for inscriptions does not work, results in
  306. X    dangling pointers when inven_types are copied
  307. Xsave.c: add 'time' to savefiles, use this to calculate age of savefile
  308. X    instead of using stat, much more portable, and prevents cheating,
  309. X    if time is newer than current time, set age to 0, when save file
  310. X    check to see if current time greater than start time, if not,
  311. X    then save start time plus one day in save file
  312. Xmac.c: delete getfileage since no longer used
  313. Xrecall.c: change knowdamage(), add damage parameter so that higher damage
  314. X    attacks take longer to learn than lower damage attacks
  315. Xmonsters.c: jellies and molds no longer have treasure
  316. Xsave.c: two places have (*str != NULL), changed to (*str != '\0')
  317. Xsave.c: remove support for pre 5.0.13 versions, rd_item() no longer needs
  318. X    patch_level
  319. Xmonsters.c: move crystal ooze from level 31 to level 40, to make raising
  320. X    crystal oozes for treasure much more dangerous
  321. X--------------- 2/19
  322. Xall: added defines for tvals, and substituted every where in program
  323. X---------- 2/21
  324. Xms_misc.c, io.c: remove all uses of mvprintw() for ibmpc port, since PC
  325. X    curses also pulls in the fp library if mvprintw is used
  326. Xdungeon.c: in the recover from blindness code, the disturb() call must
  327. X    be before the creatures(FALSE) call
  328. Xgetch.c, io.c, Makefile: more fixes for the VMS port of umoria, new getch.c
  329. X    file, and new copy of (4.87) io.c file
  330. X---------- 2/22
  331. Xall: check again for numbers that should be constants
  332. Xconstant.h: change version number to 5.0.17
  333. Xexterns.h, main.c, moria2.c, signals.c, treasure.c: compile with gcc -Wall
  334. X    and fix all reported errors
  335. X--------- 2/26
  336. Xprayer.c: change (!class[].spell == PRIEST) to (class[].spell != PRIEST)
  337. Xstore2.c: for good bargaining, use final_ask not min_buy in sell_haggle()
  338. Xdungeon.c: change "Sorry.." to "Sorry."
  339. Xmisc1.c: for gloves/gauntlets, p1 and ID_SHOW_P1 set in wrong place
  340. Xcreature.c: make_attack(), creature could be visible at start of attack but
  341. X    invisible at end due to a teleport, set notice/visible appropriately
  342. X    before monster attacks, and don't use m_ptr->ml afterwards
  343. Xmonsters.c: creeping coins always carry gold now, 1d2 for copper, 1d2+60
  344. X    for silver, and 1d2+90 for gold
  345. Xtreasure.c, wizard.c: change name of wizard items to empty string, and
  346. X    inscribe them with "wizard item"
  347. Xdesc.c: problem with rubble/stone-to-mud, change rubble case from like stairs
  348. X    to be like doors
  349. Xmoria1.c: show_equip(), change non-weight limit from 57 to 60, change weight
  350. X    limit from 49 to 52 chars, for show_inven(), change limits from
  351. X    66/74 to 68/76 characters
  352. Xcreature.c, magic.c, prayer.c, spells.c, wands.c: fix get_flags(),
  353. X    fire_ball(), fire_bolt() and breath() to use defined constants for
  354. X    attack types
  355. Xmoria1.c: show_inven(), show_equip(), make sure that col never less than zero
  356. Xall: merged in Atari ST diffs from Stephen A. Jacobs
  357. X--------------- 2/27
  358. Xcreature.c: fixed bug with doors, always open/light door instead of only
  359. X    opening/lighting them when in los of player
  360. Xmoria2.c: when bash open door, only break it 50% of the time to be consistent
  361. X    with code in creature.c
  362. Xall: delete some obsolete files, annotate a few others, put README files
  363. X    in the subdirectories to explain what is present
  364. Xsave.c: fix old savefile compatibility code to work with new version numbers
  365. Xconstants.h: change version number to 5.1.0 and publicly announce
  366. X---------- 2/28
  367. Xrecall.c: creature is worth... sprintf() call used %ld instead of %d
  368. Xmoria2.c: look_ray(), every place GRADF multiplied by y, cast it to long
  369. X    to prevent overflow of 16 bit ints
  370. Xms_misc.c: were still two refs to 'byteint', changed to 'int8u'
  371. XMLINK.LNK: updated for umoria5.0, add undef and recall, change treasur[12]
  372. X    to treasure
  373. Xcreate.c: delete sleep(1) call in character rerolling code
  374. Xdeath.c: put "#ifndef L_SET" around the #define L_SET
  375. Xio.c: ifdef out suspend code, for USG systems with BSDisms that have SIGTSTP
  376. X    defined but don't actually implement it
  377. Xio.c: change name of variable 'border' to 'screen_border' to avoid naming
  378. X    conflict on SGI/SYS V machine
  379. XINSTALL: moved from doc subdirectory to root directory, and brought up to date
  380. X---------------- 3/1
  381. Xmisc2.c: two places where (1L << j) occurred, and j could be 99 (unknown
  382. X    spell from spell_order[]), this is an undefined operation, fixed
  383. X    source to not shift if j == 99
  384. X------------------- 3/3
  385. Xmisc1.c: set_options(), typing '-' on line 0 gave error, change i=max to
  386. X    i=max-1
  387. Xstore1.c: item_value(), calculating digging tool values wrong, subtract off
  388. X    objects initial p1 plusses before multiplying p1 by 100
  389. Xdungeon.c: for paralysed/resting, move cursor to player before refresh call
  390. Xcreature.c: disenchanter bat attacks could put tohit/todam/toac below zero,
  391. X    fixed so that they can not go below zero
  392. Xmoria1.c: if have MAX_SHORT hp/mana, then could get overflow in regenhp/mana
  393. X    routines, added checks for overflow
  394. Xdungeon.c, io.c: save on EOF code did not work, in inkey(), remove casts to
  395. X    char in eof test, remove call to feof(), in dungeon(), add !eof_flag
  396. X    to innermost while loop to ensure it exits on error
  397. Xsave.c: in sv_write(), clear death flag if eof_flag or panic_save set, so
  398. X    player can restart game to see tombstone
  399. Xmain.c: set death flag if hit points are negative, can happen if a HANGUP
  400. X    savefile or panic savefile is restored
  401. Xsave.c: if get_char(), don't overwrite died_from string if player is dead
  402. Xmain.c: if specify -r or -o, force rogue_like to appropriate value after
  403. X    read the savefile, since get_char() will modify rogue_like_commands
  404. Xmoria1.c: search(), "have found a trap.." fixed, removed extra period
  405. Xmonsters.c: added CD_NO_SLEEP flag to jellies, oozes, elementals and the
  406. X    gelatinous cube
  407. Xdungeon.c: fix "which level" wizard prompt, limited to level 99 max
  408. X----------- 3/4
  409. Xall: merged in more Mac diffs, Mac version should compile now
  410. Xwizard.c: stealth max 87 should be 18 in printed string
  411. Xdesc.c: identify(), if cursed incscribe with ID_DAMD, unsample(), do not
  412. X    clear the ID_DAMD flag, since an unsampled item is still cursed
  413. Xconfig: change version number to 5.1.1 and release
  414. X------------ 3/5
  415. Xmonsters.c: added CD_NO_SLEEP flag to creeping coins
  416. Xrecall.c: recharge(), change chance of failure from randint((num+40)/10)=1
  417. X    to randint((num+40-i_ptr->p1-i_ptr->level)/10)=1 to make it harder
  418. X    to recharge high level and highlly charged wands
  419. Xrecall.c: change j from int to int32u, since it is used with flag fields,
  420. X    change two %d uses of it to %ld
  421. Xdesc.c: objdes(), don't print ID_TRIED value for store bought items
  422. Xmoria2.c: a slow dart trap now has no effect if have free action
  423. Xio.c: must ifdef out the tbuf.c_cc code, since this causes the program to
  424. X    fail for some reason
  425. X--------------- 3/13
  426. Xsignals.c: add void to USG signal_hander definition
  427. Xexterns, ms_misc.c: move fopen declaration from externs.h to ms_misc.c, and
  428. X    make static, and make FILE * not struct _iobuf
  429. Xms_ansi.c: include stdio.h
  430. Xgenerate.c: change #if DEBUG to #ifdef DEBUG
  431. Xconfig.h, generate.c, types.h: added ifdefs for IBMPC_TURBO_C
  432. X---------  3/16
  433. Xmoria1.c: inven_command() "Wear" prompt changed to "Wear/Wield"
  434. Xmonsters.c: earth elementals/spirits can now move through walls
  435. Xspells.c: wall_build(), for earth elementals, increase their hit points
  436. Xfiles.c: helpfile(), can ESC out now
  437. Xspells.c: cloning a monster will wake it up now
  438. Xdungeon.c: allow two-char control character sequences to be used with
  439. X    repeated commands (deleted else from "else if (command == '^')")
  440. Xroglcmds.hlp: document how to avoid problem with repeated dig left command,
  441. X    i.e. '13^H' doesn't work, type ^ then H, or type SPACE then ^H
  442. X--------- 3/19
  443. Xunix.c: initialize num_chars to zero in check_input(), in case FIONREAD absent
  444. X---------- 3/21
  445. Xall: fix most SYS_V lint errors
  446. X----------- 3/23
  447. Xdungeon.c, io.c: calling inkey() when check_input true is wrong since it traps
  448. X    ^R and does other stuff, instead call new function raw_inkey(), which
  449. X    only calls getch
  450. Xio.c: flush(), occasionally caused loss of output, instead of using fancy
  451. X    ioctls, drain input by using check_input/raw_inkey
  452. X--------- 3/25
  453. Xdungeon.c, io.c, unix.c, atarist.c:  AIX can't check to see if input is
  454. X    pending, but can do non-blocking read, so check_input changed so
  455. X    that it consumes input when called
  456. Xconstant.h: change version number to 5.1.2 and distribute
  457. X-------- 3/26
  458. Xsave.c: when resurrect, clear poisoned flag and food flag to prevent character
  459. X    from immediately dying again
  460. Xmain.c, misc2.c, unix.c, save.c: fix some BSD lint errors
  461. Xmoria1.c: remove unnecessary flush() call from take_hit()
  462. Xcreatures.c, misc1.c, externs.h, variable.c: fixed problem with calls to
  463. X    compact_monster() within creatures() by adding a horrible hack,
  464. X    new variable hack_monptr defined to hold current creature() monptr
  465. X---------- 3/27
  466. Xvariable.c: add infra 3/2 for elf/half-elf, were both previously 0,
  467. X    increase gnome infra from 3 to 4
  468. Xconfig.h, death.c, dungeon.c, externs.h, main.c, misc2.c, signals.c:
  469. X    modify wizard mode code, no longer need password or correct UID to
  470. X    enter, prints disclaimer then asks for confirmation
  471. Xatarist.c, death.c, misc2.c, ms_misc.c, save.c, signals.c: eliminate all
  472. X    getuid() etc. code, only place these are still used is in main.c
  473. X    and unix.c
  474. Xall: merge wizard/god mode, god mode nolonger exists
  475. Xio.c, unix.c: problems with flush() on EOF, don't call check_input if EOF,
  476. X    also, check_input returns zero if got an error on the read, also
  477. X    inkey() clears msg_flag on EOF to prevent infinite loops exit_game/
  478. X    msg_print/inkey/exit_game/etc...
  479. Xmoria2.c: monster_death(), increase tries from 10 to 20 so that treasure will
  480. X    be created more often
  481. Xconstant.h: increase MAX_MALLOC from 101 to 125 to reduce compacting monsters
  482. X    messages, increase MAX_TALLOC from 150 to 175 because it is possible
  483. X    to get compacting objects message during level generation
  484. Xconstant.h: BTH_HIT deleted, no longer used
  485. X----------- 3/28
  486. Xmoria2.c: facts(), multiply damage for missile by 2/3/4 instead of adding when
  487. X    use proper weapons, makes missiles much more useful
  488. Xsave.c: write store info and time into save file even if dead, so that can
  489. X    be restored on a resurrection
  490. Xconstant.h: change version to 5.1.3
  491. X-------- 3/30
  492. Xconstant.h, externs.h, files.c, misc2.c, moria1.c, moria2.c, staffs.c,
  493. Xwands.c, variable.c: modify how misc abilities vary with level, new variable
  494. X    class_level_adj, which holds the new adjustment values, bth, bthb,
  495. X    device, disarm and save affected
  496. Xexterns.h, misc2.c, moria2.c: critical_hits() has fourth paramter, that
  497. X    indicates whether to use CLA_BTH or CLA_BTHB class level adj
  498. Xmoria2.c: penalty for attacking invisible creatures modified, was minus
  499. X    lev * BTH_LEV_ADJ-1, now minus lev * BTH_LEV_ADJ/2, hence warriors
  500. X    have less penalty than mages/priests
  501. Xcreature.c, externs.h, misc2.c, moria2.c: test_hit has a fifth paramter, that
  502. X    indicates whether to use CLA_BTH or CLA_BTHB (or even CLA_SAVE)
  503. Xio.c: add abort() calls to move_cursor_relative(), print(), and put_buffer()
  504. X    to help find bugs in the code
  505. Xsave.c: eliminate support for versions 5.0.11 to 5.0.13
  506. Xmisc2.c: get_spell(), only say 'unknown spell' if it is actually an alphabetic
  507. X    character typed
  508. Xtreasure.c: delete one ring of adornment and one amulet of adornment,
  509. X    add arrows at level 15, and bolts at level 25
  510. X--------- 3/31
  511. Xstore1.c: change missile cost to 5*pluses instead of 10*pluses, since missiles
  512. X    appear in groups of 20 or so, this is comparable to normal weapons
  513. X    which are 100*pluses
  514. Xdistribute 5.1.3 sources
  515. X---------- 4/3
  516. Xexterns.h: ifdef out definition of errno for MSDOS
  517. Xio.c: moved process.h include for MSDOS from middle of file to start
  518. Xio.c: in print(), put_buffer(), and move_cursor_relative(), clear msg_flag
  519. X    before printing error message, prevents problems with '-more-' prompt
  520. Xrecall.c: roff_recall(), don't set normal movement bit near beginning,
  521. X    also delete code that prints 'never moves' if all move bits clear
  522. Xspells.c: teleport monster will wake it up
  523. Xscrolls.c: reading a second word of recall scroll does not reset timer
  524. Xspells.c: wall building now heals Xorns in addition to earth elementals
  525. Xspells.c: drain life damage increased from 50 to 75, to match other 50th level
  526. X    wand damages
  527. Xconstant.h, creature.c, moria2.c, variable.c: defined new class level adj
  528. X    CLA_MISC_HIT and replace all test_hit uses of CLA_SAVE with this,
  529. X    document that this is identical to save, and assumes all values same
  530. Xtreasure.c: two potions named poison, change first to weakness (lose str)
  531. X---------- 4/4
  532. Xsave.c: add some __GNUC__ ifdefs so that the UNIX style code will be used,
  533. X    not the code for the broken atari st MWC libraries
  534. X---------- 4/6
  535. Xunix.c: two include files, sys/time.h and sys/resource.h are actually BSD
  536. X    specific, put #ifndef USG around them
  537. X---------- 4/9
  538. Xdesc.c: remove all uses of "%+d", because AtariST/MWC and convex and probably
  539. X    others do not support it
  540. Xspells.c: replace_spot(), clear lr flag, so that after destruction scroll,
  541. X    destroyed areas will not be lit by a light scroll in a room
  542. Xcreature.c: let monsters eat other monsters of equal exp, helps prevent
  543. X    using oozes as treasure factories
  544. Xmoria2.c: mon_take_hit(), if kill Balrog, always update recall info even if
  545. X    Balrog invisible, since will always know it was the Balrog (winner!)
  546. Xrecall.c: sleep values too hard to learn, change test from r_wake > sleep to
  547. X    (r_wake*r_wake)>sleep
  548. X-------- 4/13
  549. Xcreature.c, moria2.c: mon_take_hit() was called within creatures() when
  550. X    monsters were trapped inside a wall, bracket call in creature.c with
  551. X    code to set hack_monptr, and add code to mon_take_hit() to check it
  552. Xcreature.c: add code at end of creatures() loop to fix2_delete_monster() in
  553. X    case monster died during movement (maybe it was in a wall?)
  554. Xexterns.h: add DGUX to USG ifdef for the 'extern int sprintf()' declaration
  555. Xio.c: added code to save/restore local mode word of tty driver, i.e.
  556. X    TIOCLSET and TIOCLGET ioctl calls
  557. Xsave.c: for atarist && __GNUC__, call fopen with "rb" and "wb" for binary mode
  558. Xio.c, unix.c: for atarist && __GNUC__, don't include <sys/wait.h>
  559. Xexterns.h: define sprintf as int (), if defined(atarist)
  560. X------------ 4/14
  561. Xexterns.h, unix.c: three new functions tilde(), topen(), and tfopen()
  562. X    which perform ~ expansion for file names, in externs.h, define open to
  563. X    topen and fopen to tfopen for unix machines
  564. Xconfig.h, dungeon.c, main.c, save.c, unix.c: add support for ANDREW
  565. X    distributed file system, SECURE define in config.h, disallows
  566. X    inferior shells, also instead of giving up setuid priviledges at
  567. X    start, calls ANDREW library functions bePlayer(), beGame(), and
  568. X    Authenticate()
  569. Xunix.c: add ifdefs to use select() when compiling for xenix
  570. X------------- 4/15
  571. Xcreature.c, externs.h, files.c, io.c, main.c, misc1.c, moria2.c, recall.c,
  572. Xsave.c, treasure.c:
  573. X    more Atari ST MWC fixes, eliminate fdopen(), make loc_symbol() return
  574. X    unsigned char, all (var & long_const) constructs assign long const to
  575. X    temp var first,
  576. X------------ 4/16
  577. XMakefile: fixed problems with 'make install'
  578. X----------- 4/19
  579. Xatarist.c: add #include <stdio.h> at start, and #endif at end
  580. Xmisc2.c: tohit_adj() toac_adj() todis_adj() todam_adj() all used cur_stat
  581. X    instead of use_stat like they should have
  582. X---------- 4/20
  583. Xmoria2.c: mon_take_hit code of 4/13 wrong, use monptr instead of i at end
  584. Xmisc2.c: remembering code wrong, add (i < 32) to stop it at end of spell list
  585. Xmoria1.c: when inven full and take off object, check for object under
  586. X    player before allowing/asking her to drop object
  587. Xsave.c: for atarist MWC port, ifdef out all of the open() calls, and only
  588. X    leave the fopen() stuff in
  589. Xmisc1.c: compact_monsters(), don't set delete_any if fix1_delete_monster()
  590. X    is called, because it does not decrement mfptr, call abort() if
  591. X    cur_dis goes below zero (i.e. can't delete any monsters)
  592. Xall: run lint on 4.3BSD and SYS V
  593. Xconstant.h: change version number to 5.1.4 and distribute
  594. X----------- 4/27
  595. Xdungeon.c: add prt_map() at top after creatures(FALSE) call for ATARIST_MWC,
  596. X    fixes display problems for some reason
  597. X---------- 5/1
  598. Xmoria1.c: inven_command(), clear msg line is ESC typed at "Drop all?" prompt
  599. X---------- 5/3
  600. Xall: eliminated upd_log(), and plog variable
  601. Xdoc/*: update all documentation, except moria.ms
  602. X---------- 5/4
  603. Xall: visit every subdirectory, create README or ERRORS files as needed,
  604. X    make everything as up to do as possible, split files greater than
  605. X    60K so that they can be posted to comp.sources.games easily
  606. Xall: deleted all tmp.* files
  607. Xexterns.h, moria1.c, moria2.c, et al: moved functions out of moria1.c and
  608. X    moria2.c to reduce their size to less than 60K, many functions not
  609. X    moved were made static
  610. Xdungeon.c, externs.h, main.c, misc2.c, save.c, variable.c: new variable
  611. X    to_be_wizard, allows resurrect without entering wizard mode,
  612. X    resurrect sets noscore = 0x1, wizard mode sets noscore = 0x2,
  613. X    prt_winner prints "Is/Was wizard" or "Resurrect" is noscore set
  614. X----------- 5/5
  615. Xmisc1.c: moved see invisible from slay animal to slay undead weapons
  616. Xdoc/moria.ms: updated documentation to reflect changes from 4.873 to 5.1,
  617. X    added section which explains crowns, added some sections from
  618. X    Chris J Stuart's BRUCE Moria's documentation
  619. X--------- 5/7
  620. Xmonsters.c: ogre mage is now evil
  621. Xfiles.c: added extern int error for MSDOS
  622. Xmoria.ms: proof read it again
  623. Xmisc1.c: reduce plus to dam for slay dragon arrows from +10 to +3, no
  624. X    longer need such high damages because ptodam is multiplied now
  625. X    when used with right weapon
  626. XMakefile: test and fix 'make install'
  627. Xibmpc/ms_ansi.c: change two escape characters to \033
  628. Xmac/moria.r: change many control characters to \xxx, update version info
  629. X    strings to 5.1.5
  630. Xconstant.h: change the version number to 5.1.5 and distribute
  631. X--------- 5/9
  632. Xconstant.h, mac/moria.r: change the version number to 5.2.0
  633. Xsave.c: fix support code for 5.0 savefiles, because of minor version number
  634. X    change, update compatibility code for 5.1 and 5.2 savefiles
  635. Xsave.c: save/restore value of died_from string
  636. X------- 5/10
  637. Xscrnmgr.r, scrntest.r: these files had control characters also, changed
  638. X    '...' to \311
  639. Xresource.hqx: recompiled the mac resource files
  640. Xmacscore.c, mac.c: changed control characters '...' to \311
  641. Xall: distribute version 5.2.0
  642. X----------- 5/14
  643. Xdeath.c, externs.h, io.c, ms_misc.c: Turbo C changes, void sleep() instead
  644. X    of unsigned sleep(), don't call reset_term() before exiting, ifdef
  645. X    out definition of sleep() in ms_misc.c, declare signal handler as
  646. X    void not int
  647. Xgenerate.c, types.h: change IBMPC_TURBO_C defines to the proper TURBOC define
  648. Xio.c: shell_out(), MSDOS code parameter to inkey() call deleted
  649. Xexterns.h: count_msg_print() changed from (int) to (char *)
  650. Xio.c: get_check(), add code to use 'y' if LINT_ARGS defined, pause_exit()
  651. X    add code to use 'delay' for MSDOS machines
  652. Xms_misc.c: clear_screen(0,0) changed to clear_screen()
  653. Xmain.c: set stack size for TURBOC by declaring the _stksize variable
  654. Xmisc2.c: player_saves(), split expression up because MPW C couldn't handle it
  655. Xsave.c: include time.h for for the Mac, delete var 'i' in save_char (unused),
  656. X    get_char() add code for MAC to return FALSE if savefile doesn't exist
  657. Xmac.c: add call to initsavedefaults() in main()
  658. Xmac/ERRORS: document problem with mac Makefile
  659. X-------- 5/15
  660. Xexterns.h: remove decl of py_bash(), which is in moria2.c and static
  661. X--------- 5/17
  662. Xdungeon.c: move search_off() call after check_view(), as panel_* variables
  663. X    must be valid before search_off() is called
  664. X-------- 5/18
  665. Xall: 7 files did not end with newlines, 5 hqx files, and origcmds.hlp,
  666. X    misc/README also did not end with a newline
  667. X-------- 5/21
  668. Xconstant.h, version.hlp, moria.r: change version number to 5.2.1
  669. XScrnMgr.doc: split all lines greater than 80 characters, to make the file
  670. X    more portable
  671. X--------- 5/22
  672. Xdeath.c: in mac sources, there was a 'true' instead of a 'TRUE'
  673. Xms_misc.c: Turbo C sscanf() incorrectly reads a newline from a blank line,
  674. X    add check for newline to code that reads configuration file
  675. Xspells.c: door_creation(), called popt() before calling delete_object()
  676. X    which could then invalidate the value returned by popt, moved
  677. X    popt() call after the delete_object() call
  678. X----------- 5/25
  679. Xcreature.c: fix the invincible/invisible monster bug, multiply_monster()
  680. X    was creating children on top of the parent, thus killing the parent
  681. X    for carnivorous monsters
  682. Xdeath.c, externs.h, generate.c, io.c, main.c, ms_misc.c, signals.c, types.h:
  683. X    change all TURBOC defines to __TURBOC__
  684. Xutil/printit: new version of the printit program by Carl Hommel, fixed up
  685. X    to be somewhat more portable and to use only moria defined constants
  686. X-------- 5/27
  687. Xplayer.c, tables.c, variable.c: Turbo C can not accept any file with more than
  688. X    64K global variables, so variable.c split into three parts, also
  689. X    updated all makefiles to refer to all three files
  690. Xmac files: all three mac Makefiles modified to delete obsolete references to
  691. X    CInterface.o and CRuntime.o, scrnmgr Makefile modified to automatically
  692. X    combine the two ScrnMgr.c parts, README updated to document a problem
  693. X    with the Makefile not appending resources and text files sometimes
  694. X---------- 5/31
  695. Xall: released umoria 5.2.1
  696. Xibmpc/ms_misc.c: corrected warn() function to use va_list, the old function
  697. X    was not strictly correct
  698. X---------- 6/4
  699. Xmisc2.c: prt_stat_block() must also call prt_study()
  700. Xmisc2.c: random_object() could create objects outside of map boudaries,
  701. X    added an in_bounds() call to fix
  702. X------------- 6/6
  703. Xmain.c: changed 'if (p = getenv(...))' to 'if ((p = getenv(...)) != NULL)'
  704. X    to avoid compiler warnings
  705. Xmoria1.c: rest_on(), add check to make sure rest_num fits in short
  706. Xibmpc/umoria.prj: new file, a project file for Turbo C 2.0
  707. X------------- 6/9
  708. Xio.c: HP-UX does not have VEOL2, added #ifdef VEOL2 around its use
  709. Xdungeon.c: clear message line after change_character(), since as ESCAPE
  710. X    exit does not
  711. Xmoria1.c: for 'x' and 'w' commands, clear heavy_weapon flag before calling
  712. X    check_strength, so that always get heavy message when wielding heavy
  713. X    weapon, and never get light message when wielding light weapon
  714. Xscrolls.c: identify scroll can move arbitrarily far after ident_spell(),
  715. X    replace simple 'moved one down' check with loop to search until found
  716. Xmain.c: fixed starup code so that don't get 'savefile doesn't exist'
  717. X    message anymore when starting a new game
  718. Xall: apply fix to all uses of long constant with & | << operators to avoid
  719. X    a Mark Williams C bug on the Atari ST
  720. Xexterns.h, files.c: removed MSDOS declaration of errno from files.c, and
  721. X    remove ifndef MSDOS from errno decl in externs.h
  722. Xmisc1.c: changed name of variable 'clock' to 'clock_var' to avoid problem
  723. X    with a mac compiler (not sure which one)
  724. Xio.c: every io.c file, remove '\0' as alias for ESCAPE from get_com() and
  725. X    get_comdir() (MAC only function)
  726. Xmoria1.c: light_dam() calls inven_damage(set_lightning_destroy, 3) which
  727. X    gives it a small chance of destroying objects in player's pack,
  728. X    this makes it just like the other *_dam() functions
  729. Xspells.c: teleport_to(), add call to in_bound() to make sure player will
  730. X    be teleported to somewhere inside the dungeon
  731. X------------- 6/10
  732. Xconfig.h: add note about using GCC on an Atari ST
  733. Xmain.c, save.c, undef.c: eliminated the unused _new_log() function
  734. Xdeath.c, dungeon.c, externs.h, save.c, undef.c, variable.c: eliminated the
  735. X    mostly unused log_index variable, the few uses of it were replaced
  736. X    with references to character_saved
  737. Xexterns.h, files.c, io.c, undef.c: init_scorefile() implemented, same as
  738. X    in umoria 4.87
  739. Xmain.c, undef.c: eliminate unused function init_files()
  740. Xconstant.h, moria.r, version.hlp: change version number to 5.2.2
  741. X----------- 6/11
  742. Xibmpc/ms_misc.c: added space to GRAPHICS scanf, to try to eliminate problem
  743. X    with Turco C
  744. Xdeath.c, externs.h, files.c, save.c, variable.c: extensive changes to
  745. X    implement the scorefile, total_points(), highscores(), display_
  746. X    scores(), set_fileptr(), rd_highscore(), and wr_highscore() defined
  747. X    scorefile holds 1000 entries max, has one sex/race/class entry per
  748. X    non-zero uid, has live characters also
  749. Xunix/Makefile: fix the treatment of score file, don't copy over old one,
  750. X    just use touch to create one if it doesn't exist
  751. Xundef.c: finally eliminated
  752. X---------- 6/13
  753. Xall: lint under 4.3 BSD and AIX 2.2.1 (SYS V)
  754. Xscores: readd scores file, since it makes micro distributions much easier
  755. Xdeath.c: modify savefile for single user machine, so that it tries to
  756. X    prevent a single character from appearing multiple times in the
  757. X    savefile, checks for identical names, and killed by = (saved)
  758. Xplayer.c: eliminated the unused dsp_race[] array
  759. Xdeath.c: added code to implement flock() for systems which don't have it,
  760. X    based on code written by CJS for BRUCE Moria
  761. X---------- 6/17
  762. Xall: fixes for VMS, define USG for VMS, merge in fixes from Todd Pierzina
  763. X---------- 6/23
  764. Xscrolls.c: for curse weapon, call py_bonuses(-1) before clear flags so
  765. X    that attributes will be turned off
  766. Xmoria1.c: calc_bonuses(), handle AC just like everything else, previously
  767. X    did not add in AC bonus if armor was cursed
  768. Xcreature.c, moria2.c: doors weren't being broken when bashed, change
  769. X    "randint(2) - 1" to "1 - randint(2)"
  770. X----------- 7/14
  771. Xall: merge in some changes indiciated by warnings/prototypes generated by
  772. X    MSC 5.x
  773. Xrecall.c: compute monster kill exp in long, to avoid overflow of int
  774. Xall: added AMIGA support
  775. Xamiga/: new directory to hold support files for the amiga
  776. Xmain.c: variable result was not initialized to false
  777. X------------- 7/15
  778. Xall: merge in more VMS patches
  779. Xdeath.c, dungeon.c: fixed display_scores() and 'V' command problems
  780. Xcreature.c, dungeon.c, misc2.c, moria1.c: new feature '*' rest until
  781. X    reach max mana and hp, print error message for illegal rest count
  782. Xall: removed improper define of NULL, new define CNIL for (char *)0, used
  783. X    instead of NULL where appropriate, eliminate strange include orders
  784. X    that the previous NULL define required
  785. Xio.c: ifdefed out the include for termio.h, as this caused it to be included
  786. X    twice on some systems (curses.h includes it also) causing problems
  787. Xmacrsrc.h: changed MAX_RESTART from 37 to 36
  788. X--------- 7/21
  789. Xms_misc.c: fixed reading of empty lines from config file for Turbo C
  790. X-------- 7/22
  791. Xio.c: fix Amiga code for flush()
  792. Xtypes.h: reduce size of cave_type structure for Amiga/Aztec C 5.0
  793. Xdeath.c: fix display_scores(), so that it only shows entries belonging to
  794. X    current player when show_player is true
  795. X--------- 8/29
  796. Xmisc2.c: deleted some redundant code in gain_spells() where it calculates
  797. X    which spells a player can learn
  798. Xspells.c: recharge(), could call randint() with 0 or negative numbers, check
  799. X    for these cases before calling randint()
  800. X--------- 9/8
  801. Xmoria1.c: inven_command(), when drop/remove object and inven/equip are both
  802. X    empty, set inven weight to zero, just to be safe
  803. Xdungeon.c: jamdoor(), when jam a door, decrement inven_weight by weight of
  804. X    one spike
  805. Xmoria1.c: inven_command(), make spikes wieldable objects, fight with them
  806. X    like missile weapons, i.e. they disappear after use
  807. Xdesc.c: objdes(), add damage multiplier of bows to their name
  808. Xexterns.h, io.c, misc1.c, save.c variable.c: new option sound_beep_flag, so
  809. X    that players can turn off bad character beep if desired
  810. Xdesc.c, misc2.c: modify known1_p() to return TRUE for objects which never
  811. X    have a color, modify objdes() to work with the new convention,
  812. X    modify inven_carry() so that objects are added to the inventory
  813. X    sorted by subval if they are known1_p()
  814. X---------- 9/9
  815. Xmisc1.c: add_food(), fix so that does not use f_ptr->slow to set f_ptr->food
  816. X    value, this makes it much less likely to overflow the food level
  817. Xmisc2.c: inven_carry(), yesterday's insert in order fix does not work for
  818. X    items which can be unknown1p, only insert items ordered by subval if
  819. X    they are always known1p, i.e. object_offset() returns -1
  820. Xexterns.h, misc1.c, misc2.c, save.c variable.c: new option display rest/repeat
  821. X    counts, since these counts make resting at 1200 baud or less
  822. X    unbearably slow, people need to be able to turn them off
  823. Xstore2.c: get_haggle(), let RET default to the last inc/dec amount when
  824. X    haggling
  825. Xmisc1.c: compact_monsters(), return FALSE if could not delete any monsters
  826. X    instead of aborting, popm() return -1 if could not allocate monster
  827. X    (i.e. compact_monsters() failed), place_win_monster() abort if popm()
  828. X    fails which should never happen, place_monster()
  829. Xexterns.h: place_monster() now int type not void,
  830. Xcreature.c, misc1.c, spells.c: fix users of place_monster() to check result,
  831. X    and fail if place_monster() failed, really only necessary for the
  832. X    calls in creature.c, these fixes fix the monster list overflow bug
  833. Xdungeon.c, externs.h, misc1.c: change compact_monsters() from static to
  834. X    extern, call it from within main loop in dungeon.c if there are less
  835. X    than 10 spaces left in the monster list, compact_monsters() is much
  836. X    more likely to be successful when called here than when called from
  837. X    creatures()
  838. X----------- 9/11
  839. Xsignals.c: delete extra definition of error_sig for ATARIST_MWC
  840. Xatari_st/README: update with GCC and Turbo C info
  841. Xfiles.c: fix typo, filname1 -> filename1
  842. X--------------- 9/18
  843. Xmac.c, ScrnMgr1.c: replace uses of KeyMapLM with GetKeys() call
  844. X------------- 9/19
  845. Xmisc1.c: m_bonus(), could overflow on 16 bit machines when level >= 263
  846. X    when calculating stand_dev
  847. Xdeath.c, externs.h, save.c: store the encryption byte for each savefile record
  848. X    immediately before it in the scorefile, makes the scorefile more
  849. X    robust in the face of a system crash, rd_highscore(), wr_highscore()
  850. X    no longer pass the encryption byte
  851. Xdeath.c: added version numbers to the savefile
  852. Xdeath.c, externs.h, save.c, variable.c: add max_score to savefile, which is
  853. X    the maximum score the character has reached so far, total_points()
  854. X    modified to use the larger of the computed score, and the value of
  855. X    max_score, this prevents a "(saved)" message on the score file for
  856. X    a dead character, which died having fewer points than when it was
  857. X    last saved
  858. X----------- 9/26
  859. Xdeath.c, externs.h, main.c, save.c, types.h, variable.c: new global variable
  860. X    birth_date, set to time when character created, saved in save files
  861. X    and scorefile, when loading character check to see if the a character
  862. X    in the scorefile has the same race/sex/class/uid/birth_date and
  863. X    its died_from is not "(saved)", in which case this character will not
  864. X    be scored
  865. Xmisc2.c: print "Duplicate" on screen for such duplicate characters
  866. Xall: update all documentation, README, and other misc descriptive files
  867. Xall: add fixes for Atari ST/Turbo C 2.0
  868. Xall: lint on Sun3/uVAX/MIPS/RT_PC
  869. Xrecall.c: when printing out depth of monster, print Balrog as 50 not 100
  870. X----------- 10/3
  871. Xall: fix all problems reported by maniscan/cshar, except for control-L
  872. X    characters on a line by themselves
  873. X----------- 10/7
  874. Xcreature.c: mon_move(), cast m_ptr->fy-1 to int, so that negative values
  875. X    will correctly compare to it, in the wall building code
  876. Xspoilers: new file, lists spell damages
  877. Xmisc2.c: prt_experience(), always check whether exp is greater than max_exp,
  878. X    previously did not when player was at level 40
  879. Xcreature.c: mon_move(), set the recall CM_ATTACK_ONLY bit when a monster
  880. X    should have moved but did not, instead of the old method of setting it
  881. X    when a non-moving monster attacked
  882. Xstore2.c: get_haggle(), fix bugs in the automatic increment code, also, when
  883. X    reach final offer, set the automatic increment to the required diff,
  884. X    so that player need only hit return to bid the final amount
  885. Xmoria2.c: tunnel(), before checking for tunneling into a invisible monster,
  886. X    check to make sure player is tunneling somewhere which has an effect,
  887. X    otherwise, player can use this to 'detect' invisible monsters in
  888. X    open spaces by trying to tunnel there
  889. Xmoria1.c: calc_bonuses(), base AC should always be visible, as long as the
  890. X    item is not cursed
  891. X------- 10/8
  892. Xspells.c: td_destroy2(), should not destroy chests, not disarms and unlocks
  893. X    them instead
  894. Xmisc2.c: put_misc3(), clear_from(14) not 13, was clearing the gold value
  895. Xfiles.c: file_character(), add the "Max Exp" and "Exp to Adv" fields to
  896. X    the info written to a file, to match the on screen display
  897. Xfiles.c: file_character(), set fd to -1, not NULL, code was closing stdin
  898. X    (== 0 == NULL) when could not open file
  899. Xdeath.c: exit_game(), clear character_saved before calling highscores(),
  900. X    prevents inkey() from recursively calling exit_game() when eof on
  901. X    stdin has been detected
  902. Xall: released 5.2.2 sources
  903. X----------- 10/23
  904. Xdeath.c: highscores(), must do fseek() after reaching EOF before changing
  905. X    read/write mode, previously only did this for VMS, now do this for
  906. X    all systems
  907. X----------- 10/26
  908. Xconfig.h, death.c, io.c: fix VMS errors, declare 'string' in death.c
  909. X    duplicate_character(), fix typos in other files
  910. Xdungeon.c: for VMS, after calling kbhit(), must consume one character
  911. Xvms/Makefile: fixed, mostly change constants.h to constant.h
  912. X------------ 10/30
  913. Xdeath.c, externs.h, files.c, save.c: define STDIO_LOADED after including
  914. X    stdio.h, then use it to control declarations in externs.h
  915. Xconstant.h, death.c: define SCOREFILE_SIZE as 1000, and use it in death.c
  916. Xmoria2.c: cast_spell(), when don't have enough mana, use 'gods may think you
  917. X    presumptuous' message instead of 'summon your limited strength'
  918. X----------- 11/4
  919. Xibmpc/moria.cnf: add ^M, since otherwise MSDOS moria can't read file properly
  920. Xio.c: include stdio.h explicitly, and define STDIO_LOADED, so savefile
  921. X    can be closed when shelling out
  922. Xstore2.c: get_haggle(), clear increment when invalid increment entered
  923. Xstore2.c, variables.c: last_store_inc contradictory declarations, changed both
  924. X    to int16
  925. Xexterns, misc2.c, sets.c, spells.c: set_*_destroy changed to take inven_type
  926. X    pointer instead of tval, modified so that (Rx) items won't be
  927. X    destroyed by attacks of type x
  928. Xdeath.c: for single user systems, use birth_date instead of name when
  929. X    looking for matching characters in savefile
  930. Xdeath.c: MSDOS setmode() needs file descriptor, not FILE pointer
  931. Xfiles/*: removed all TABS, since some systems do not handle them properly,
  932. X    specifically, Turbo C on the Atari ST and IBM-PC
  933. Xmisc1.c: rings of searching cost was 100*p1, amulet of searching cost 20*p1,
  934. X    change both to 50*p1
  935. Xmac/macio.c, ibmpc/tcio.c: modify beep() so that it uses the new option flag
  936. Xdesc.c: changed the (*2) string for bows to (x2)
  937. Xspells.c: slow monster and confuse monster modified to wake up monster if
  938. X    the attacks fails
  939. Xspells.c: wall_to_mud() and dispel_creature(), print messages even if
  940. X    monster not visible since the effects are visible/audible
  941. Xmoria2.c: for fire/acid/gas traps, print the trap message first, and then
  942. X    damage an item
  943. Xtreasure.c: change name of lose memories potion to lose experience, so it
  944. X    won't be confused with monster memories
  945. Xspells.c: trap_creation(), don't create a trap under the player, to prevent
  946. X    strange occurances such as ending up under a falling rock
  947. Xmoria2.c: tunnel(), when wielding heavy weapon, make tunneling more difficult
  948. X----------- 11/6
  949. Xvms/getch.c: New code for kb_hit(), which was tested and works under VMS 5.2
  950. X    the old code did not work for VMS 5.2
  951. X----------- 11/9
  952. Xmisc1.c: compact_monsters(), distance test was backwards!, now delete monsters
  953. X    farther away first,  allow a final pass with distance of 0,
  954. X    never delete the Balrog during compaction
  955. X---------- 11/21
  956. Xdoc/history: rewrote history file to bring it up-to-date
  957. Xmisc2.c: gain_spells(), don't need to be able to read spell books if learning
  958. X    priestly spells, don't fail if blind or no light
  959. Xdeath.c: fix #ifdef typo around <time.h> include
  960. X----------- 12/1
  961. Xstore2.c: when good bargainer, change string to "final offer", and allow
  962. X    return to accept final offer
  963. Xplayer.c: change rogue start inv from Soft Armor to Cloak, so that it is the
  964. X    same as the other non-Warrior classes
  965. Xdungeon.c: decrement command count after do_command() instead of before,
  966. X    so that all counted commands will work right, this fixes 3^P
  967. X--------- 12/5
  968. Xdeath.c: display_scores(), fix VMS bug, truncate uid to a short before
  969. X    comparing against the uid in the score file record, also move
  970. X    the uid computation outside the loop to speedup the procedure
  971. Xio.c: put_buffer (), for Atari ST, was printing the untruncated out_str
  972. X    instead of tmp_str
  973. X--------- 12/14
  974. Xatari_st/curscomp/curses.[ch], death.c, files.c, io.c, signals.c:
  975. X    add Atari ST TC fixes for the new (in 5.2.2) code
  976. END_OF_FILE
  977. if test 51602 -ne `wc -c <'OChanges'`; then
  978.     echo shar: \"'OChanges'\" unpacked with wrong size!
  979. fi
  980. # end of 'OChanges'
  981. fi
  982. if test -f 'source/misc4.c' -a "${1}" != "-c" ; then 
  983.   echo shar: Will not clobber existing file \"'source/misc4.c'\"
  984. else
  985. echo shar: Extracting \"'source/misc4.c'\" \(2618 characters\)
  986. sed "s/^X//" >'source/misc4.c' <<'END_OF_FILE'
  987. X/* source/misc4.c: misc code for maintaining the dungeon, printing player info
  988. X
  989. X   Copyright (c) 1989-92 James E. Wilson, Robert A. Koeneke
  990. X
  991. X   This software may be copied and distributed for educational, research, and
  992. X   not for profit purposes provided that this copyright and statement are
  993. X   included in all such copies. */
  994. X
  995. X#ifdef __TURBOC__
  996. X#include    <stdio.h>
  997. X#endif
  998. X
  999. X#include "config.h"
  1000. X#include "constant.h"
  1001. X#include "types.h"
  1002. X#include "externs.h"
  1003. X
  1004. X#ifndef USG
  1005. X#include <sys/types.h>
  1006. X#include <sys/param.h>
  1007. X#endif
  1008. X
  1009. X#ifdef USG
  1010. X#ifndef ATARIST_MWC
  1011. X#include <string.h>
  1012. X#endif
  1013. X#else
  1014. X#include <strings.h>
  1015. X#endif
  1016. X
  1017. X
  1018. X/* Add a comment to an object description.        -CJS- */
  1019. Xvoid scribe_object()
  1020. X{
  1021. X  int item_val, j;
  1022. X  vtype out_val, tmp_str;
  1023. X
  1024. X  if (inven_ctr > 0 || equip_ctr > 0)
  1025. X    {
  1026. X      if (get_item(&item_val, "Which one? ", 0, INVEN_ARRAY_SIZE, CNIL, CNIL))
  1027. X    {
  1028. X      objdes(tmp_str, &inventory[item_val], TRUE);
  1029. X      (void) sprintf(out_val, "Inscribing %s", tmp_str);
  1030. X      msg_print(out_val);
  1031. X      if (inventory[item_val].inscrip[0] != '\0')
  1032. X        (void) sprintf(out_val, "Replace %s New inscription:",
  1033. X               inventory[item_val].inscrip);
  1034. X      else
  1035. X        (void) strcpy(out_val, "Inscription: ");
  1036. X      j = 78 - strlen(tmp_str);
  1037. X      if (j > 24)
  1038. X        j = 12;
  1039. X      prt(out_val, 0, 0);
  1040. X      if (get_string(out_val, 0, (int)strlen(out_val), j))
  1041. X        inscribe(&inventory[item_val], out_val);
  1042. X    }
  1043. X    }
  1044. X  else
  1045. X    msg_print("You are not carrying anything to inscribe.");
  1046. X}
  1047. X
  1048. X/* Append an additional comment to an object description.    -CJS- */
  1049. Xvoid add_inscribe(i_ptr, type)
  1050. Xinven_type *i_ptr;
  1051. Xint8u type;
  1052. X{
  1053. X  i_ptr->ident |= type;
  1054. X}
  1055. X
  1056. X/* Replace any existing comment in an object description with a new one. CJS*/
  1057. Xvoid inscribe(i_ptr, str)
  1058. Xinven_type *i_ptr;
  1059. Xchar *str;
  1060. X{
  1061. X  (void) strcpy(i_ptr->inscrip, str);
  1062. X}
  1063. X
  1064. X
  1065. X/* We need to reset the view of things.            -CJS- */
  1066. Xvoid check_view()
  1067. X{
  1068. X  register int i, j;
  1069. X  register cave_type *c_ptr, *d_ptr;
  1070. X
  1071. X  c_ptr = &cave[char_row][char_col];
  1072. X  /* Check for new panel           */
  1073. X  if (get_panel(char_row, char_col, FALSE))
  1074. X    prt_map();
  1075. X  /* Move the light source           */
  1076. X  move_light(char_row, char_col, char_row, char_col);
  1077. X  /* A room of light should be lit.     */
  1078. X  if (c_ptr->fval == LIGHT_FLOOR)
  1079. X    {
  1080. X      if ((py.flags.blind < 1) && !c_ptr->pl)
  1081. X    light_room(char_row, char_col);
  1082. X    }
  1083. X  /* In doorway of light-room?           */
  1084. X  else if (c_ptr->lr && (py.flags.blind < 1))
  1085. X    {
  1086. X      for (i = (char_row - 1); i <= (char_row + 1); i++)
  1087. X    for (j = (char_col - 1); j <= (char_col + 1); j++)
  1088. X      {
  1089. X        d_ptr = &cave[i][j];
  1090. X        if ((d_ptr->fval == LIGHT_FLOOR) && !d_ptr->pl)
  1091. X          light_room(i, j);
  1092. X      }
  1093. X    }
  1094. X}
  1095. END_OF_FILE
  1096. if test 2618 -ne `wc -c <'source/misc4.c'`; then
  1097.     echo shar: \"'source/misc4.c'\" unpacked with wrong size!
  1098. fi
  1099. # end of 'source/misc4.c'
  1100. fi
  1101. echo shar: End of archive 3 \(of 39\).
  1102. cp /dev/null ark3isdone
  1103. MISSING=""
  1104. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 ; do
  1105.     if test ! -f ark${I}isdone ; then
  1106.     MISSING="${MISSING} ${I}"
  1107.     fi
  1108. done
  1109. if test "${MISSING}" = "" ; then
  1110.     echo You have unpacked all 39 archives.
  1111.     echo "Now run "bldfiles.sh" to build split files"
  1112.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1113. else
  1114.     echo You still need to unpack the following archives:
  1115.     echo "        " ${MISSING}
  1116. fi
  1117. ##  End of shell archive.
  1118. exit 0
  1119.