home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zephyr.ens.tek.com!master!saab!billr
- From: billr@saab.CNA.TEK.COM (Bill Randle)
- Newsgroups: comp.sources.games
- Subject: v14i059: umoria4 - single player dungeon simulation (ver. 5.5), Part27/39
- Message-ID: <3423@master.CNA.TEK.COM>
- Date: 22 Aug 92 22:13:39 GMT
- Sender: news@master.CNA.TEK.COM
- Lines: 1734
- Approved: billr@saab.CNA.TEK.COM
-
- Submitted-by: grabiner@math.harvard.edu (David Grabiner)
- Posting-number: Volume 14, Issue 59
- Archive-name: umoria4/Part27
- Supersedes: umoria3: Volume 9, Issue 55-97; Volume 10, Issue 15-17
- Environment: Curses, Unix, Mac, MS-DOS, Atari-ST, Amiga, VMS
-
-
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 27 (of 39)."
- # Contents: doc/moria2.ms source/misc2.c
- # Wrapped by billr@saab on Thu Aug 20 09:11:33 1992
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'doc/moria2.ms' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'doc/moria2.ms'\"
- else
- echo shar: Extracting \"'doc/moria2.ms'\" \(26700 characters\)
- sed "s/^X//" >'doc/moria2.ms' <<'END_OF_FILE'
- X.NH 1
- XThe Town Level
- X.LP
- XThe town level is where you will begin your adventure. The
- Xtown consists of six buildings each with an entrance, some
- Xtowns people, and a wall which surrounds the town. The first time
- Xyou are in town it will be daytime, but you may return to find
- Xthat darkness has fallen. (Note that some spells may act
- Xdifferently in the town level.)
- X
- X.NH 2
- XTownspeople
- X.LP
- XThe town contains many different kinds of people. There are
- Xthe street urchins, young children who will mob an adventurer for
- Xmoney, and seem to come out of the woodwork when excited.
- XBlubbering Idiots are a constant annoyance, but not harmful.
- XPublic drunks wander about the town singing, and are of no
- Xthreat to anyone. Sneaky rogues hang about watching for a
- Xlikely victim to mug. And finally, what town would be complete
- Xwithout a swarm of half drunk warriors, who take offense or
- Xbecome annoyed just for the fun of it.
- X.LP
- XMost of the towns people should be avoided by the largest
- Xpossible distance when you wander from store to store. Fights
- Xwill break out though, so be prepared. Since your character grew
- Xup in this world of intrigue, no experience is awarded for
- Xkilling on the town level.
- X
- X.NH 2
- XSupplies
- X.LP
- XYour character will begin his adventure with some supplies
- Xalready on him. Use the Inventory `i' command to check what
- Xthese supplies are. It will be necessary to buy other supplies
- Xbefore continuing into the dungeon, however, so be sure to enter
- Xeach of the stores.
- X
- X.NH 2
- XTown Buildings
- X.LP
- XYou may enter any of the stores, if they are open, and
- Xbarter with the owner for items you can afford.
- XWhen bartering, you enter prices you will pay (or accept) for
- Xsome object. You can either enter the absolute amount, or
- Xprecede a number with a plus or minus sign to give a positive or negative
- Xincrement on your previous offer. If you have previously given an
- Xincrement or decrement amount, you can just type RETURN, and the program
- Xwill use the last increment amount that you typed.
- XBut be warned
- Xthat the owners can easily be insulted, and may even throw you
- Xout for a while if you insult them too often. To enter a store,
- Xsimply move onto the entrance represented by the numbers 1
- Xthrough 6.
- X.LP
- XIf you consistently bargain well in a store, that is, you reach
- Xthe final offer much more often than not, then the store owner will
- Xeventually recognize that you are a superb haggler, and will go directly
- Xto the final offer instead of haggling with you. Items which cost
- Xless than 10 gold pieces do not count, as haggling well with these items
- Xis usually either very easy or almost impossible.
- XAlso, the store owner will always haggle for items costing more than
- X1000 gold pieces, because of the amount of money involved.
- X.LP
- XOnce inside a store, the store inventory will appear on the screen
- Xalong with a set of options for your character. You may browse
- Xthe store's inventory if it takes more than one page to display,
- Xand you may sell to, or purchase items from, his inventory. You can
- Xexecute your inventory and equipment commands to see what you are
- Xcarrying. Not shown with the options are the wear, take off, and
- Xexchange commands which will also work, but were excluded to keep
- Xthe options simple.
- X.LP
- XStores do not always have everything in stock. As the game
- Xprogresses, they may get new items so check from time to time.
- XAlso, if you sell them an item, it may get sold to a customer
- Xwhile you are adventuring, so don't always expect to be able to
- Xget back everything you have sold.
- X.LP
- XStore owners will not buy harmful or useless items. If an
- Xobject is unidentified, they will pay you some base price for it.
- XOnce they have bought it they will immediately identify the
- Xobject. If it is a good object, they will add it to their
- Xinventory. If it was a bad bargain, they simply throw the item
- Xaway. In any case, you may receive some knowledge of the item if
- Xanother is encountered.
- X.IP "The General Store"
- XThe General Store sells foods, drinks, some clothing,
- Xtorches, lamps, oil, shovels, picks, and spikes. All of these items,
- Xand some others,
- Xcan be sold back to the General store for money. The entrance to
- Xthe General Store is a `1'.
- X.IP "The Armory"
- XThe Armory is where the town's armor is fashioned. All
- Xsorts of protective gear may be bought and sold here. The
- Xentrance to the Armory is a `2'.
- X.IP "The Weaponsmith\'s Shop"
- XThe Weaponsmith's Shop is where the town's weapons are
- Xfashioned. Hand and missile weapons may be purchased and sold
- Xhere, along with arrows, bolts, and shots. The entrance to the
- XWeaponsmith's is a `3'.
- X.IP "The Temple"
- XThe Temple deals in healing and restoration potions, as well
- Xas bless scrolls, word of recall scrolls, some approved priestly
- Xweapons, etc. The entrance to the Temple is a `4'.
- X.IP "The Alchemy shop"
- XThe Alchemy Shop deals in all manner of potions and scrolls.
- XThe entrance to the Alchemy Shop is a `5'.
- X.IP "The Magic User\'s Shop"
- XThe Magic User's Shop is the most expensive of all the
- Xstores. It deals in all sorts of rings, wands, amulets, and
- Xstaves. The entrance to the Magic Shop is a `6'.
- X
- X.NH 1
- XWithin The Dungeon
- X.LP
- XOnce your character is adequately supplied with food, light,
- Xarmor, and weapons, he is ready to enter the dungeon. Move on
- Xtop of the `>' symbol and use the down `>' command. Your
- Xcharacter enters a maze of interconnecting staircases and finally
- Xpasses through a one-way door. He is now on the first level of
- Xthe dungeon (50 feet), and must survive many horrible and
- Xchallenging encounters to find the treasure lying about.
- X.LP
- XThere are two sources for light once inside the dungeon.
- XPermanent light which has been magically placed within rooms, and
- Xa light source carried by the player. If neither is present, the
- Xcharacter will be unable to map or see any attackers. Lack of
- Xlight will also affect searching, picking locks, and disarming.
- X.LP
- XA character must wield a torch or lamp in order to supply
- Xhis own light. Once a torch or lamp has only 50 or less turns
- Xleft before burning out, the message \*QYour light is growing faint\*U
- Xwill be displayed at random intervals. Once a torch is burnt
- Xout, it is useless and can be dropped. A lamp or lantern can be
- Xrefilled with oil by using the Fill `F' command. You must of
- Xcourse be carrying extra oil to refill a lantern.
- X
- X.NH 1
- XAttacking and Being Attacked
- X.LP
- XAttacking is simple in \fImoria\fP. If you move into a creature,
- Xyou attack him. You can attack from a distance by firing a
- Xmissile, or by magical means such as aiming a wand. Creatures
- Xattack in the same way, if they move into you, they attack you.
- XSome creatures can also cast spells from a distance, and others
- Xcan breathe fire or worse on you from a distance.
- X.LP
- XCreatures moving in walls can not be attacked by wands and other magic
- Xattacks normally stopped by walls. You can attack a creature in a wall
- Xnormally though by trying to move into the wall space containing the
- Xcreature. However, in order to attack an invisible creature in
- Xa wall, you must tunnel into the wall containing the creature. If you
- Xjust try to move into the wall, you will bump your head and look quite
- Xsilly.
- X.LP
- XIf you are wielding a weapon, the damage for the weapon is
- Xused when you hit a creature. Otherwise
- Xyou get two fist strikes. Very strong creatures can do
- Xa lot of damage with their fists... You may have a
- Xprimary weapon, and a secondary weapon which is kept on your
- Xbelt or shoulder for immediate use. You can switch
- Xbetween your primary and secondary weapons with the exchange
- Xcommand. Be sure to wield the proper weapon when
- Xfighting. Hitting a dragon over the head with a bow will simply
- Xmake him mad, and get you killed.
- X.LP
- XMissile weapons, such as bows, can be wielded, and then the
- Xproper missile, in this case an arrow, can be fired across the
- Xroom into a target. Missiles can be used without the proper
- Xmissile weapon, but used together they have a greater range and
- Xdo far more damage.
- X.LP
- XHits and misses are determined by ability to hit versus armor
- Xclass. A hit is a strike that does some damage;
- Xa miss may in fact reach a target, but fails to do any damage.
- XHigher armor classes
- Xmake it harder to do damage, and so lead to more misses.
- X
- X.NH 2
- XMonster Memories.
- X.LP
- XThere are hundreds of different creatures in the mines of \fImoria\fP,
- Xmany of which look the same on the screen.
- XThe exact species of a creature can be discovered by looking at it.
- XIt is also very difficult to keep track of the capabilities of
- Xvarious creatures. Rather than forcing you to keep notes, \fImoria\fP
- Xautomatically keeps track of your experiences with a particular
- Xcreature. This is called the monster memory. Your monster memory
- Xrecalls the particular attacks of each creature (whether or not
- Xtechnically a monster) which you have suffered, as well as recalling
- Xif you have observed them to multiply or move erratically, or drop
- Xtreasure, or many other attributes.
- X.LP
- XIf you have killed enough of a particular creature, or suffered
- Xenough attacks, recalling the monster memory may also provide you with
- Xinformation not otherwise available, such as a armor class or hit dice.
- XThese are not explained, but may be useful to give the relative danger
- Xof each creature. This memory can be passed on to a new character
- Xeven after you die, by means of a reduced save file.
- X
- X.NH 2
- XYour Weapon
- X.LP
- XCarrying a weapon in your backpack does you no good. You
- Xmust wield a weapon before it can be used in a fight.
- XA secondary weapon can be kept by wielding it and then using the
- Xexchange command. A secondary weapon is not in use, simply
- Xready to be switched with the current weapon if needed.
- X.LP
- XWeapons have two main characteristics, their ability to hit
- Xand their ability to do damage, expressed as `(+#,+#)'. A normal
- Xweapon would be `(+0,+0)'. Many weapons in \fImoria\fP have magical
- Xbonuses to hit and/or do damage. Some weapons are cursed, and
- Xhave penalties that hurt the player. Cursed weapons
- Xcannot be unwielded until the curse is lifted.
- X.LP
- X\fIMoria\fP assumes that your youth in the rough environment
- Xnear the dungeons
- Xhas taught you the relative merits of different
- Xweapons, and displays as part of their description the damage dice which
- Xdefine their capabilities.
- XThe ability to damage is added to the dice roll for that weapon.
- XThe dice used for a given weapon is displayed as `#d#'. The first
- Xnumber indicates how many dice to roll, and the second indicates how many
- Xsides they have. A \*Q2d6\*U weapon will give damage from 2 to 12, plus any
- Xdamage bonus. The weight of a weapon is also a consideration. Heavy
- Xweapons may hit harder, but they are also harder to use.
- XDepending on your strength and the weight of the weapon, you may get
- Xseveral hits in one turn.
- X.LP
- XMissile booster weapons, such as bows, have their characteristics added
- Xto those of the missile used, if the proper weapon/missile combination
- Xis used. Also, these weapons will multiply the base damage of the missile
- Xby a number from 2 to 4, depending on the strength of the weapon. This
- Xmultiplier is displayed as `(*#)'.
- X.LP
- XAlthough you receive any magical bonuses an unidentified
- Xweapon may possess when you wield it, those bonuses will not be
- Xadded in to the displayed values of to-hit and to-dam on your
- Xcharacter sheet. You must identify the weapon before the
- Xdisplayed values reflect the real values used.
- X.LP
- XFinally, some rare weapons have special abilities. These are
- Xcalled ego weapons, and are feared by great and meek. An ego
- Xsword must be wielded to receive benefit of its abilities.
- X.LP
- XSpecial weapons are denoted by the following abbreviations:
- X.IP "DF - Defender."
- XA magical weapon that actually helps the wielder defend
- Xhimself, thus increasing his/her armor class, and protecting him/her
- Xagainst damage from fire, frost, acid, lightning, and falls.
- XThis weapon also will increase your stealth, let you see invisible
- Xcreatures, protect you from paralyzation attacks, and help you
- Xregenerate hit points and mana faster. As a result of the
- Xregerenation ability, you will use up food faster than normal
- Xwhile wielding such a weapon.
- X.IP "FB - Frost Brand."
- XA magical weapon of ice that delivers a cold critical to
- Xheat based creatures. It will inflict one and a half times
- Xthe normal damage when used against a heat based creature.
- X.IP "FT - Flame Tongue."
- XA magical weapon of flame that delivers a heat critical
- Xto cold based creatures. It will inflict one and a half times
- Xthe normal damage when used against cold based or
- Xinflammable creatures.
- X.IP "HA - Holy Avenger."
- XA Holy Avenger is one of the most powerful of weapons.
- XA Holy Avenger will increase your strength and your armor class.
- XThis weapon will do extra damage when used against evil and undead
- Xcreatures, and will also give you the ability to see invisible
- Xcreatures.
- X.IP "SD - Slay Dragon."
- XA Slay Dragon weapon is a special purpose weapon whose
- Xsole intent is to destroy dragon-kind. Therefore, when used
- Xagainst a dragon, the amount of damage done is four
- Xtimes the normal amount.
- X.IP "SE - Slay Evil."
- XA Slay Evil weapon is a special purpose weapon whose
- Xsole intent is to destroy all forms of evil. When used
- Xagainst an evil creature, either alive or undead, the damage
- Xdone twice the normal amount.
- X.IP "SM - Slay Animal."
- XA Slay Animal weapon is a special purpose weapon whose
- Xsole intent is to destroy all the dangerous animals in the world.
- XAn animal is any creature natural to the world.
- XTherefore an orc would not be an animal, but a giant snake would
- Xbe. This will inflict twice the normal amount of damage when
- Xused against an animal.
- X.IP "SU - Slay Undead."
- XA Slay Undead weapon is a special purpose weapon whose
- Xsole intent is to destroy all forms of undead. This weapon
- Xis hated and feared by the intelligent undead, for a single
- Xblow from this weapon will inflict three times the normal
- Xamount of damage.
- XThis weapon also gives you the ability to see invisible creatures,
- Xwhich is especially useful against undead, since many of them
- Xare normally invisible.
- X
- X.NH 2
- XBody and Shield Bashes
- X.LP
- XWeight is the primary factor in being able to bash
- Xsomething, but strength plays a role too. After bashing, a
- Xcharacter may be off balance for several rounds depending upon
- Xhis dexterity.
- X.LP
- XDoors can be broken down by bashing them. Once a door is
- Xbashed open, it is forever useless and cannot be closed.
- X.LP
- XChests too may be bashed open, but be warned that the
- Xcareless smashing of a chest often ruins the contents. Bashing
- Xopen a chest will not disarm any traps it may contain, but does
- Xallow the strong and ignorant to see what is inside.
- X.LP
- XFinally, a creature may be bashed. If a shield is currently
- Xbeing worn, the bash is a shield bash and will do more damage.
- XIn either case, a bash may throw an opponent off balance for a
- Xnumber of rounds, allowing a player to get in a free hit or more.
- XIf the player is thrown off balance, his opponent may get free
- Xhits on him. This is a risky attack.
- X
- X.NH 2
- XYour Armor Class
- X.LP
- XArmor class is a number that describes the amount and the
- Xquality of armor being worn. Armor class will generally run from
- Xabout 0 to 60, but could become negative or greater than 60 in
- Xrare cases.
- X.LP
- XThe larger your armor class, the more protective it is. A
- Xnegative armor class would actually help get you hit. Armor
- Xprotects you in three manners. One, it makes you harder to be
- Xhit for damage. A hit for no damage is the same as a miss. Two,
- Xgood armor will absorb some of the damage that your character
- Xwould have taken. An armor class of 30 would absorb 15% of any
- Xdamage meant for him. Three, acid damage is reduced by
- Xwearing body armor. It is obvious that a high armor class is a
- Xmust for surviving the lower levels of \fImoria\fP.
- X.LP
- XEach piece of armor has an armor class adjustment, and a
- Xmagical bonus. Armor bought in town will have these values
- Xdisplayed with their description. Armor that is found within the
- Xdungeon must be identified before these values will be displayed.
- XAll armor always has the base armor class displayed, to which the
- Xbonus is added. It is always possible to figure this out anyway,
- Xby watching the effect it has on your displayed armor class.
- X.LP
- XArmor class values are always displayed between a set of
- Xbrackets as `[#]' or `[#,+#]'. The first value is the armor
- Xclass of the item. The
- Xsecond number is the magical bonus of the item which is only
- Xdisplayed if known, and will always
- Xhave a sign preceding the value. There are a few cases where the
- Xform `[+#]' is used, meaning the object has no armor class, only
- Xa magical armor bonus if worn.
- X.LP
- XSome pieces of armor will possess special abilities denoted
- Xby the following abbreviations:
- X.IP "RA - Resist Acid."
- XA character using such an object will take only one third normal
- Xdamage from any acid thrown upon him. In addition, armor so
- Xenchanted will resist the acid's effects and not be damaged
- Xby it.
- X.IP "RC - Resist Cold."
- XA character using a resist cold object will take only
- Xone third damage from frost and cold.
- X.IP "RF - Resist Fire."
- XA character using a resist fire object will take only one
- Xthird damage from heat and fire.
- X.IP "RL - Resist Lightning."
- XA character using a resist lightning object will take only
- Xone third damage from electrical attacks.
- X.IP "R - Resistance."
- XA character wearing armor with this ability will have
- Xresistance to Acid, Cold, Fire, and Lightning as explained in
- Xeach part above.
- X
- X.NH 2
- XCrowns
- X.LP
- XSome crowns also have special magical abilities that improve
- Xyour chances in a battle.
- X.IP "Crown of Might"
- XThis is the great crown of the warriors. The wearer will
- Xhave an increased strength, dexterity, and constituion, and will also be
- Ximmune to any foe's attempt to slow or paralyze him or her.
- X.IP "Crown of the Magi"
- X This is the great crown of the wizards. The wearer will have
- Xan increased intelligence, and will also be given resistance against
- Xfire, frost, acid, and lightning.
- X.IP "Crown of Lordliness"
- XThis is the great crown of the priests. The wearer will have
- Xan increased wisdom and charisma.
- X.IP "Crown of Seeing"
- XThis is the great crown of the rogues. The wearer will be able
- Xto see even invisible creatures, and will have an increased ability
- Xto locate traps and secret doors.
- X.IP "Crown of Regeneration"
- XThis crown will help you regenerate hit points and mana more quickly
- Xthan normal, allowing you to fight longer before needing to rest.
- XYou will use of food faster than normal while wearing this crown
- Xbecause of the regenerative effects.
- X.IP "Crown of Beauty"
- XThis crown looks impressive, and will increase your charisma, but
- Xis otherwise not useful.
- X
- X.NH 1
- XObjects Found In The Dungeon
- X.LP
- XThe mines are full of objects just waiting to be picked up
- Xand used. How did they get there? Well, the main source for
- Xuseful items are all the foolish adventurers that proceeded into
- Xthe dungeon before you. They get killed, and the helpful
- Xcreatures scatter the various treasure throughout the dungeon.
- XMost cursed items are placed there by the joyful evil sorcerers,
- Xwho enjoy a good joke when it gets you killed.
- X.LP
- XYou pick up objects by moving on top of them. You can carry
- Xup to 22 different items in your backpack while wearing and
- Xwielding many others. Although you are limited to 22
- Xdifferent items, you may be carrying several items of each kind
- Xrestricted only by the amount of weight your character can carry.
- XYour weight limit is determined by your strength.
- XOnly one object may occupy a given floor location, which
- Xmay or may not also contain one creature. Doors, traps,
- Xand staircases are considered objects for this purpose.
- X.LP
- XIf you try to carry more weight than your limit, you will move
- Xmore slowly than normal until you drop the extra weight. If picking
- Xup an object would take you over your weight limit, then you will
- Xbe asked whether you really want to pick it up. It is a good idea
- Xto leave the object alone if you are fleeing from a monster.
- X.LP
- XMany objects found within the dungeon have special commands
- Xfor their use. Wands must be Aimed, staves must be Used, scrolls
- Xmust be Read, and potions must be Quaffed. In any case, you must
- Xfirst be able to carry an object before you can use it. Some
- Xobjects, such as chests, are very complex. Chests contain other
- Xobjects and may be trapped, and/or locked. Read the list of
- Xplayer commands carefully for a further understanding of chests.
- X.LP
- XOne item in particular will be discussed here. The scroll
- Xof \*QWord of Recall\*U can be found within the dungeon, or bought at
- Xthe temple in town. It acts in two manners, depending upon your
- Xcurrent location. If read within the dungeon, it will teleport
- Xyou back to town. If read in town, it will teleport you back
- Xdown to the deepest level of the dungeon one which your character
- Xhas previously been. This makes the scroll very useful for
- Xgetting back to the deeper levels of \fImoria\fP. Once the scroll has
- Xbeen read it takes a while for the spell to act, so don't expect
- Xit to save you in a crisis.
- X.LP
- XThe game provides some automatic inscriptions to help you keep track
- Xof your possessions. Wands and staves which are known to be empty
- Xwill be inscribed with \*Qempty\*U. Objects which have been tried
- Xat least once, but haven't been identified yet will be inscribed with
- X\*Qtried\*U. Cursed objects are inscribed with \*Qdamned\*U. Also,
- Xoccasionally you will notice that something in your inventory or
- Xequipment list seems to be magical. High level characters are much
- Xmore likely to notice this than beginning characters. When you do
- Xnotice this, the item in question will be inscribed with \*Qmagik\*U.
- X.LP
- XAnd lastly, a final warning: not all objects are what they
- Xseem. Skeletons lying peacefully about the dungeon have been
- Xknown to get up...
- X
- X.NH 2
- XCursed Objects
- X.LP
- XSome objects, mainly armor and weapons, have had curses laid
- Xupon them. These horrible objects will look like any other
- Xnormal item, but will detract from your character's stats or
- Xabilities if worn. They will also be impossible to remove until
- Xa remove curse is done.
- X.LP
- XIf you wear or wield a cursed item, you will immediately feel
- Xsomething wrong. The item will also be inscribed \*Qdamned\*U.
- X
- X.NH 2
- XMining
- X.LP
- XMuch of the treasure within the dungeon can be found only by
- Xmining it out of the walls. Many rich strikes exist within each
- Xlevel, but must be found and mined. Quartz veins are the
- Xrichest, yielding the most metals and gems, but magma veins will
- Xhave some hordes hidden within.
- X.LP
- XMining is virtually impossible without a pick or shovel.
- XPicks and shovels have an additional magical ability expressed as `(+#)'.
- XThe higher the number, the better the magical digging
- Xability of the tool. A pick or shovel also has pluses
- Xto hit and damage, and can be used as a weapon.
- X.LP
- XWhen a vein of quartz or magma is located, the character
- Xshould wield his pick or shovel and begin digging out a section.
- XWhen that section is removed, he should locate another section of
- Xthe vein, and begin the process again. Since granite rock is
- Xmuch harder to dig through, it is much faster to follow the vein
- Xexactly and dig around the granite.
- XThere is an option for highlighting magma and quartz.
- X.LP
- XIf the character has a scroll or staff of treasure location,
- Xhe can immediately locate all strikes of treasure within a vein
- Xshown on the screen. This makes mining much easier and more
- Xprofitable.
- X.LP
- XIt is sometimes possible to get a character trapped within
- Xthe dungeon by using various magical spells and items. So it is
- Xa very good idea to always carry some kind of digging tool, even
- Xwhen you are not planning on tunneling for treasure.
- X
- X.NH 2
- XStaircases, Secret Doors, Passages, and Rooms
- X.LP
- XStaircases are the manner in which you get deeper, or climb
- Xout of the dungeon. The symbols for the up and down staircases
- Xare the same as the commands to use them. A `<' represents an up
- Xstaircase and a `>' represents a down staircase. You must move
- Xyour character over the staircase before you can use them.
- X.LP
- XEach level has at least one up staircase, and at least two
- Xdown staircases. There are no exceptions to this rule. You may
- Xhave trouble finding some well hidden secret doors, but the
- Xstairs are there.
- X.LP
- XMany secret doors are used within the dungeon to confuse and
- Xdemoralize adventurers foolish enough to enter. But with some
- Xluck, and lots of concentration, you can find these secret doors.
- XSecret doors will sometimes hide rooms or corridors, or even
- Xentire sections of that level of the dungeon. Sometimes they
- Xsimply hide small empty closets or even dead ends.
- X.LP
- XCreatures in the dungeon will generally know and use these
- Xsecret doors. If they leave one open, you will be able to go
- Xright through it. If they close it behind them you will have to
- Xsearch for the catch first. Once a secret door has been
- Xdiscovered by you, it is drawn as a known door and no more
- Xsearching will be required to use it.
- X
- X.NH 1
- XWinning The Game
- X.LP
- XOnce your character has progressed into killing dragons with
- Xbut a mean glance and snap of his fingers, he may be ready to
- Xtake on the Balrog. The Balrog will appear on most levels after
- Xlevel 49, so don't go down there until you are ready for him.
- X.LP
- XThe Balrog cannot be killed in some of the easier methods
- Xused on normal creatures. Because of the Balrog's cunning, he
- Xwill teleport away to another level if a spell such as destruction
- Xis used upon him, and the Balrog cannot be polymorphed, slept,
- Xcharmed, or genocided.
- XMagical spells like coldball are effective against him
- Xas are weapons, but he is difficult to kill and if allowed to
- Xescape for a time can heal himself.
- X.LP
- XIf you should actually survive the attempt of killing the
- XBalrog, you will receive the status of WINNER. Since you have
- Xdefeated the toughest creature alive, your character is ready to
- Xretire and cannot be saved. When you quit the game, your
- Xcharacter receives a surprise bonus score.
- X
- X.NH 1
- XUpon Death and Dying
- X.LP
- XIf your character falls below 0 hit points, he has died and
- Xcannot be restored. A tombstone showing information about your
- Xcharacter will be displayed.
- XYou are also permitted to get a record of your character, and all
- Xyour equipment (identified) either on the screen or in a file.
- X.LP
- XYour character will leave behind a reduced save file, which contains
- Xonly the monster memory and your option choices. It may be restored,
- Xin which case the new character is generated exactly as if the file
- Xwas not there, but the new player will find his monster memory
- Xcontaining all the experience of past incarnations.
- X
- X.NH 1
- XWizards
- X.LP
- XThere are rumors of \fImoria\fP Wizards which, if asked nicely,
- Xcan explain details of the \fImoria\fP game that seem complicated to
- Xbeginners.
- END_OF_FILE
- if test 26700 -ne `wc -c <'doc/moria2.ms'`; then
- echo shar: \"'doc/moria2.ms'\" unpacked with wrong size!
- fi
- # end of 'doc/moria2.ms'
- fi
- if test -f 'source/misc2.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'source/misc2.c'\"
- else
- echo shar: Extracting \"'source/misc2.c'\" \(26765 characters\)
- sed "s/^X//" >'source/misc2.c' <<'END_OF_FILE'
- X/* source/misc2.c: misc utility and initialization code, magic objects code
- X
- X Copyright (c) 1989-92 James E. Wilson, Robert A. Koeneke
- X
- X This software may be copied and distributed for educational, research, and
- X not for profit purposes provided that this copyright and statement are
- X included in all such copies. */
- X
- X#ifdef __TURBOC__
- X#include <stdio.h>
- X#endif /* __TURBOC__ */
- X
- X#include "config.h"
- X#include "constant.h"
- X#include "types.h"
- X#include "externs.h"
- X
- X
- X/* Chance of treasure having magic abilities -RAK- */
- X/* Chance increases with each dungeon level */
- Xvoid magic_treasure(x, level)
- Xint x, level;
- X{
- X register inven_type *t_ptr;
- X register int chance, special, cursed, i;
- X int tmp;
- X#ifdef ATARIST_MWC
- X int32u holder;
- X#endif
- X
- X chance = OBJ_BASE_MAGIC + level;
- X if (chance > OBJ_BASE_MAX)
- X chance = OBJ_BASE_MAX;
- X special = chance / OBJ_DIV_SPECIAL;
- X cursed = (10 * chance) / OBJ_DIV_CURSED;
- X t_ptr = &t_list[x];
- X
- X /* some objects appear multiple times in the object_list with different
- X levels, this is to make the object occur more often, however, for
- X consistency, must set the level of these duplicates to be the same
- X as the object with the lowest level */
- X
- X /* Depending on treasure type, it can have certain magical properties*/
- X switch (t_ptr->tval)
- X {
- X case TV_SHIELD: case TV_HARD_ARMOR: case TV_SOFT_ARMOR:
- X if (magik(chance))
- X {
- X t_ptr->toac += m_bonus(1, 30, level);
- X if (magik(special))
- X switch(randint(9))
- X {
- X case 1:
- X#ifdef ATARIST_MWC
- X t_ptr->flags |= (holder = TR_RES_LIGHT|TR_RES_COLD|TR_RES_ACID|
- X TR_RES_FIRE);
- X#else
- X t_ptr->flags |= (TR_RES_LIGHT|TR_RES_COLD|TR_RES_ACID|
- X TR_RES_FIRE);
- X#endif
- X t_ptr->name2 = SN_R;
- X t_ptr->toac += 5;
- X t_ptr->cost += 2500;
- X break;
- X case 2: /* Resist Acid */
- X#ifdef ATARIST_MWC
- X t_ptr->flags |= (holder = TR_RES_ACID);
- X#else
- X t_ptr->flags |= TR_RES_ACID;
- X#endif
- X t_ptr->name2 = SN_RA;
- X t_ptr->cost += 1000;
- X break;
- X case 3: case 4: /* Resist Fire */
- X#ifdef ATARIST_MWC
- X t_ptr->flags |= (holder = TR_RES_FIRE);
- X#else
- X t_ptr->flags |= TR_RES_FIRE;
- X#endif
- X t_ptr->name2 = SN_RF;
- X t_ptr->cost += 600;
- X break;
- X case 5: case 6: /* Resist Cold */
- X#ifdef ATARIST_MWC
- X t_ptr->flags |= (holder = TR_RES_COLD);
- X#else
- X t_ptr->flags |= TR_RES_COLD;
- X#endif
- X t_ptr->name2 = SN_RC;
- X t_ptr->cost += 600;
- X break;
- X case 7: case 8: case 9: /* Resist Lightning*/
- X#ifdef ATARIST_MWC
- X t_ptr->flags |= (holder = TR_RES_LIGHT);
- X#else
- X t_ptr->flags |= TR_RES_LIGHT;
- X#endif
- X t_ptr->name2 = SN_RL;
- X t_ptr->cost += 500;
- X break;
- X }
- X }
- X else if (magik(cursed))
- X {
- X t_ptr->toac -= m_bonus(1, 40, level);
- X t_ptr->cost = 0;
- X#ifdef ATARIST_MWC
- X t_ptr->flags |= (holder = TR_CURSED);
- X#else
- X t_ptr->flags |= TR_CURSED;
- X#endif
- X }
- X break;
- X
- X case TV_HAFTED: case TV_POLEARM: case TV_SWORD:
- X /* always show tohit/todam values if identified */
- X t_ptr->ident |= ID_SHOW_HITDAM;
- X if (magik(chance))
- X {
- X t_ptr->tohit += m_bonus(0, 40, level);
- X /* Magical damage bonus now proportional to weapon base damage */
- X tmp = t_ptr->damage[0] * t_ptr->damage[1];
- X t_ptr->todam += m_bonus(0, 4*tmp, tmp*level/10);
- X /* the 3*special/2 is needed because weapons are not as common as
- X before change to treasure distribution, this helps keep same
- X number of ego weapons same as before, see also missiles */
- X if (magik(3*special/2))
- X switch(randint(16))
- X {
- X case 1: /* Holy Avenger */
- X#ifdef ATARIST_MWC
- X t_ptr->flags |= (holder = TR_SEE_INVIS|TR_SUST_STAT|
- X TR_SLAY_UNDEAD|TR_SLAY_EVIL|TR_STR);
- X#else
- X t_ptr->flags |= (TR_SEE_INVIS|TR_SUST_STAT|TR_SLAY_UNDEAD|
- X TR_SLAY_EVIL|TR_STR);
- X#endif
- X t_ptr->tohit += 5;
- X t_ptr->todam += 5;
- X t_ptr->toac += randint(4);
- X /* the value in p1 is used for strength increase */
- X /* p1 is also used for sustain stat */
- X t_ptr->p1 = randint(4);
- X t_ptr->name2 = SN_HA;
- X t_ptr->cost += t_ptr->p1*500;
- X t_ptr->cost += 10000;
- X break;
- X case 2: /* Defender */
- X#ifdef ATARIST_MWC
- X t_ptr->flags |= (holder = TR_FFALL|TR_RES_LIGHT|TR_SEE_INVIS|
- X TR_FREE_ACT|TR_RES_COLD|TR_RES_ACID|
- X TR_RES_FIRE|TR_REGEN|TR_STEALTH);
- X#else
- X t_ptr->flags |= (TR_FFALL|TR_RES_LIGHT|TR_SEE_INVIS|TR_FREE_ACT
- X |TR_RES_COLD|TR_RES_ACID|TR_RES_FIRE|
- X TR_REGEN|TR_STEALTH);
- X#endif
- X t_ptr->tohit += 3;
- X t_ptr->todam += 3;
- X t_ptr->toac += 5 + randint(5);
- X t_ptr->name2 = SN_DF;
- X /* the value in p1 is used for stealth */
- X t_ptr->p1 = randint(3);
- X t_ptr->cost += t_ptr->p1*500;
- X t_ptr->cost += 7500;
- X break;
- X case 3: case 4: /* Slay Animal */
- X t_ptr->flags |= TR_SLAY_ANIMAL;
- X t_ptr->tohit += 3;
- X t_ptr->todam += 3;
- X t_ptr->name2 = SN_SA;
- X t_ptr->cost += 5000;
- X break;
- X case 5: case 6: /* Slay Dragon */
- X t_ptr->flags |= TR_SLAY_DRAGON;
- X t_ptr->tohit += 3;
- X t_ptr->todam += 3;
- X t_ptr->name2 = SN_SD;
- X t_ptr->cost += 4000;
- X break;
- X case 7: case 8: /* Slay Evil */
- X t_ptr->flags |= TR_SLAY_EVIL;
- X t_ptr->tohit += 3;
- X t_ptr->todam += 3;
- X t_ptr->name2 = SN_SE;
- X t_ptr->cost += 4000;
- X break;
- X case 9: case 10: /* Slay Undead */
- X#ifdef ATARIST_MWC
- X t_ptr->flags |= (holder = TR_SEE_INVIS|TR_SLAY_UNDEAD);
- X#else
- X t_ptr->flags |= (TR_SEE_INVIS|TR_SLAY_UNDEAD);
- X#endif
- X t_ptr->tohit += 2;
- X t_ptr->todam += 2;
- X t_ptr->name2 = SN_SU;
- X t_ptr->cost += 3000;
- X break;
- X case 11: case 12: case 13: /* Flame Tongue */
- X#ifdef ATARIST_MWC
- X t_ptr->flags |= (holder = TR_FLAME_TONGUE);
- X#else
- X t_ptr->flags |= TR_FLAME_TONGUE;
- X#endif
- X t_ptr->tohit++;
- X t_ptr->todam += 3;
- X t_ptr->name2 = SN_FT;
- X t_ptr->cost += 2000;
- X break;
- X case 14: case 15: case 16: /* Frost Brand */
- X#ifdef ATARIST_MWC
- X t_ptr->flags |= (holder = TR_FROST_BRAND);
- X#else
- X t_ptr->flags |= TR_FROST_BRAND;
- X#endif
- X t_ptr->tohit++;
- X t_ptr->todam++;
- X t_ptr->name2 = SN_FB;
- X t_ptr->cost += 1200;
- X break;
- X }
- X }
- X else if (magik(cursed))
- X {
- X t_ptr->tohit -= m_bonus(1, 55, level);
- X /* Magical damage bonus now proportional to weapon base damage */
- X tmp = t_ptr->damage[0] * t_ptr->damage[1];
- X t_ptr->todam -= m_bonus(1, 11*tmp/2, tmp*level/10);
- X#ifdef ATARIST_MWC
- X t_ptr->flags |= (holder = TR_CURSED);
- X#else
- X t_ptr->flags |= TR_CURSED;
- X#endif
- X t_ptr->cost = 0;
- X }
- X break;
- X
- X case TV_BOW:
- X /* always show tohit/todam values if identified */
- X t_ptr->ident |= ID_SHOW_HITDAM;
- X if (magik(chance))
- X {
- X t_ptr->tohit += m_bonus(1, 30, level);
- X t_ptr->todam += m_bonus(1, 20, level); /* add damage. -CJS- */
- X }
- X else if (magik(cursed))
- X {
- X t_ptr->tohit -= m_bonus(1, 50, level);
- X t_ptr->todam -= m_bonus(1, 30, level); /* add damage. -CJS- */
- X#ifdef ATARIST_MWC
- X t_ptr->flags |= (holder = TR_CURSED);
- X#else
- X t_ptr->flags |= TR_CURSED;
- X#endif
- X t_ptr->cost = 0;
- X }
- X break;
- X
- X case TV_DIGGING:
- X /* always show tohit/todam values if identified */
- X t_ptr->ident |= ID_SHOW_HITDAM;
- X if (magik(chance))
- X {
- X tmp = randint(3);
- X if (tmp < 3)
- X t_ptr->p1 += m_bonus(0, 25, level);
- X else
- X {
- X /* a cursed digging tool */
- X t_ptr->p1 = -m_bonus(1, 30, level);
- X t_ptr->cost = 0;
- X#ifdef ATARIST_MWC
- X t_ptr->flags |= (holder = TR_CURSED);
- X#else
- X t_ptr->flags |= TR_CURSED;
- X#endif
- X }
- X }
- X break;
- X
- X case TV_GLOVES:
- X if (magik(chance))
- X {
- X t_ptr->toac += m_bonus(1, 20, level);
- X if (magik(special))
- X {
- X if (randint(2) == 1)
- X {
- X#ifdef ATARIST_MWC
- X t_ptr->flags |= (holder = TR_FREE_ACT);
- X#else
- X t_ptr->flags |= TR_FREE_ACT;
- X#endif
- X t_ptr->name2 = SN_FREE_ACTION;
- X t_ptr->cost += 1000;
- X }
- X else
- X {
- X t_ptr->ident |= ID_SHOW_HITDAM;
- X t_ptr->tohit += 1 + randint(3);
- X t_ptr->todam += 1 + randint(3);
- X t_ptr->name2 = SN_SLAYING;
- X t_ptr->cost += (t_ptr->tohit+t_ptr->todam)*250;
- X }
- X }
- X }
- X else if (magik(cursed))
- X {
- X if (magik(special))
- X {
- X if (randint(2) == 1)
- X {
- X t_ptr->flags |= TR_DEX;
- X t_ptr->name2 = SN_CLUMSINESS;
- X }
- X else
- X {
- X t_ptr->flags |= TR_STR;
- X t_ptr->name2 = SN_WEAKNESS;
- X }
- X t_ptr->ident |= ID_SHOW_P1;
- X t_ptr->p1 = -m_bonus(1, 10, level);
- X }
- X t_ptr->toac -= m_bonus(1, 40, level);
- X#ifdef ATARIST_MWC
- X t_ptr->flags |= (holder = TR_CURSED);
- X#else
- X t_ptr->flags |= TR_CURSED;
- X#endif
- X t_ptr->cost = 0;
- X }
- X break;
- X
- X case TV_BOOTS:
- X if (magik(chance))
- X {
- X t_ptr->toac += m_bonus(1, 20, level);
- X if (magik(special))
- X {
- X tmp = randint(12);
- X if (tmp > 5)
- X {
- X#ifdef ATARIST_MWC
- X t_ptr->flags |= (holder = TR_FFALL);
- X#else
- X t_ptr->flags |= TR_FFALL;
- X#endif
- X t_ptr->name2 = SN_SLOW_DESCENT;
- X t_ptr->cost += 250;
- X }
- X else if (tmp == 1)
- X {
- X t_ptr->flags |= TR_SPEED;
- X t_ptr->name2 = SN_SPEED;
- X t_ptr->ident |= ID_SHOW_P1;
- X t_ptr->p1 = 1;
- X t_ptr->cost += 5000;
- X }
- X else /* 2 - 5 */
- X {
- X t_ptr->flags |= TR_STEALTH;
- X t_ptr->ident |= ID_SHOW_P1;
- X t_ptr->p1 = randint(3);
- X t_ptr->name2 = SN_STEALTH;
- X t_ptr->cost += 500;
- X }
- X }
- X }
- X else if (magik(cursed))
- X {
- X tmp = randint(3);
- X if (tmp == 1)
- X {
- X t_ptr->flags |= TR_SPEED;
- X t_ptr->name2 = SN_SLOWNESS;
- X t_ptr->ident |= ID_SHOW_P1;
- X t_ptr->p1 = -1;
- X }
- X else if (tmp == 2)
- X {
- X t_ptr->flags |= TR_AGGRAVATE;
- X t_ptr->name2 = SN_NOISE;
- X }
- X else
- X {
- X t_ptr->name2 = SN_GREAT_MASS;
- X t_ptr->weight = t_ptr->weight * 5;
- X }
- X t_ptr->cost = 0;
- X t_ptr->toac -= m_bonus(2, 45, level);
- X#ifdef ATARIST_MWC
- X t_ptr->flags |= (holder = TR_CURSED);
- X#else
- X t_ptr->flags |= TR_CURSED;
- X#endif
- X }
- X break;
- X
- X case TV_HELM: /* Helms */
- X if ((t_ptr->subval >= 6) && (t_ptr->subval <= 8))
- X {
- X /* give crowns a higher chance for magic */
- X chance += (int) (t_ptr->cost / 100);
- X special += special;
- X }
- X if (magik(chance))
- X {
- X t_ptr->toac += m_bonus(1, 20, level);
- X if (magik(special))
- X {
- X if (t_ptr->subval < 6)
- X {
- X tmp = randint(3);
- X t_ptr->ident |= ID_SHOW_P1;
- X if (tmp == 1)
- X {
- X t_ptr->p1 = randint(2);
- X t_ptr->flags |= TR_INT;
- X t_ptr->name2 = SN_INTELLIGENCE;
- X t_ptr->cost += t_ptr->p1*500;
- X }
- X else if (tmp == 2)
- X {
- X t_ptr->p1 = randint(2);
- X t_ptr->flags |= TR_WIS;
- X t_ptr->name2 = SN_WISDOM;
- X t_ptr->cost += t_ptr->p1*500;
- X }
- X else
- X {
- X t_ptr->p1 = 1 + randint(4);
- X#ifdef ATARIST_MWC
- X t_ptr->flags |= (holder = TR_INFRA);
- X#else
- X t_ptr->flags |= TR_INFRA;
- X#endif
- X t_ptr->name2 = SN_INFRAVISION;
- X t_ptr->cost += t_ptr->p1*250;
- X }
- X }
- X else
- X {
- X switch(randint(6))
- X {
- X case 1:
- X t_ptr->ident |= ID_SHOW_P1;
- X t_ptr->p1 = randint(3);
- X#ifdef ATARIST_MWC
- X t_ptr->flags |= (holder = TR_FREE_ACT|TR_CON|TR_DEX|
- X TR_STR);
- X#else
- X t_ptr->flags |= (TR_FREE_ACT|TR_CON|TR_DEX|TR_STR);
- X#endif
- X t_ptr->name2 = SN_MIGHT;
- X t_ptr->cost += 1000 + t_ptr->p1*500;
- X break;
- X case 2:
- X t_ptr->ident |= ID_SHOW_P1;
- X t_ptr->p1 = randint(3);
- X t_ptr->flags |= (TR_CHR|TR_WIS);
- X t_ptr->name2 = SN_LORDLINESS;
- X t_ptr->cost += 1000 + t_ptr->p1*500;
- X break;
- X case 3:
- X t_ptr->ident |= ID_SHOW_P1;
- X t_ptr->p1 = randint(3);
- X#ifdef ATARIST_MWC
- X t_ptr->flags |= (holder = TR_RES_LIGHT|TR_RES_COLD|
- X TR_RES_ACID|TR_RES_FIRE|TR_INT);
- X#else
- X t_ptr->flags |= (TR_RES_LIGHT|TR_RES_COLD|TR_RES_ACID|
- X TR_RES_FIRE|TR_INT);
- X#endif
- X t_ptr->name2 = SN_MAGI;
- X t_ptr->cost += 3000 + t_ptr->p1*500;
- X break;
- X case 4:
- X t_ptr->ident |= ID_SHOW_P1;
- X t_ptr->p1 = randint(3);
- X t_ptr->flags |= TR_CHR;
- X t_ptr->name2 = SN_BEAUTY;
- X t_ptr->cost += 750;
- X break;
- X case 5:
- X t_ptr->ident |= ID_SHOW_P1;
- X t_ptr->p1 = 5*(1 + randint(4));
- X#ifdef ATARIST_MWC
- X t_ptr->flags |= (holder = TR_SEE_INVIS|TR_SEARCH);
- X#else
- X t_ptr->flags |= (TR_SEE_INVIS|TR_SEARCH);
- X#endif
- X t_ptr->name2 = SN_SEEING;
- X t_ptr->cost += 1000 + t_ptr->p1*100;
- X break;
- X case 6:
- X t_ptr->flags |= TR_REGEN;
- X t_ptr->name2 = SN_REGENERATION;
- X t_ptr->cost += 1500;
- X break;
- X }
- X }
- X }
- X }
- X else if (magik(cursed))
- X {
- X t_ptr->toac -= m_bonus(1, 45, level);
- X#ifdef ATARIST_MWC
- X t_ptr->flags |= (holder = TR_CURSED);
- X#else
- X t_ptr->flags |= TR_CURSED;
- X#endif
- X t_ptr->cost = 0;
- X if (magik(special))
- X switch(randint(7))
- X {
- X case 1:
- X t_ptr->ident |= ID_SHOW_P1;
- X t_ptr->p1 = -randint (5);
- X t_ptr->flags |= TR_INT;
- X t_ptr->name2 = SN_STUPIDITY;
- X break;
- X case 2:
- X t_ptr->ident |= ID_SHOW_P1;
- X t_ptr->p1 = -randint (5);
- X t_ptr->flags |= TR_WIS;
- X t_ptr->name2 = SN_DULLNESS;
- X break;
- X case 3:
- X#ifdef ATARIST_MWC
- X t_ptr->flags |= (holder = TR_BLIND);
- X#else
- X t_ptr->flags |= TR_BLIND;
- X#endif
- X t_ptr->name2 = SN_BLINDNESS;
- X break;
- X case 4:
- X#ifdef ATARIST_MWC
- X t_ptr->flags |= (holder = TR_TIMID);
- X#else
- X t_ptr->flags |= TR_TIMID;
- X#endif
- X t_ptr->name2 = SN_TIMIDNESS;
- X break;
- X case 5:
- X t_ptr->ident |= ID_SHOW_P1;
- X t_ptr->p1 = -randint (5);
- X t_ptr->flags |= TR_STR;
- X t_ptr->name2 = SN_WEAKNESS;
- X break;
- X case 6:
- X t_ptr->flags |= TR_TELEPORT;
- X t_ptr->name2 = SN_TELEPORTATION;
- X break;
- X case 7:
- X t_ptr->ident |= ID_SHOW_P1;
- X t_ptr->p1 = -randint (5);
- X t_ptr->flags |= TR_CHR;
- X t_ptr->name2 = SN_UGLINESS;
- X break;
- X }
- X }
- X break;
- X
- X case TV_RING: /* Rings */
- X switch(t_ptr->subval)
- X {
- X case 0: case 1: case 2: case 3:
- X if (magik(cursed))
- X {
- X t_ptr->p1 = -m_bonus(1, 20, level);
- X#ifdef ATARIST_MWC
- X t_ptr->flags |= TR_CURSED;
- X#else
- X t_ptr->flags |= TR_CURSED;
- X#endif
- X t_ptr->cost = -t_ptr->cost;
- X }
- X else
- X {
- X t_ptr->p1 = m_bonus(1, 10, level);
- X t_ptr->cost += t_ptr->p1*100;
- X }
- X break;
- X case 4:
- X if (magik(cursed))
- X {
- X t_ptr->p1 = -randint(3);
- X#ifdef ATARIST_MWC
- X t_ptr->flags |= (holder = TR_CURSED);
- X#else
- X t_ptr->flags |= TR_CURSED;
- X#endif
- X t_ptr->cost = -t_ptr->cost;
- X }
- X else
- X t_ptr->p1 = 1;
- X break;
- X case 5:
- X t_ptr->p1 = 5 * m_bonus(1, 20, level);
- X t_ptr->cost += t_ptr->p1*50;
- X if (magik (cursed))
- X {
- X t_ptr->p1 = -t_ptr->p1;
- X#ifdef ATARIST_MWC
- X t_ptr->flags |= (holder = TR_CURSED);
- X#else
- X t_ptr->flags |= TR_CURSED;
- X#endif
- X t_ptr->cost = -t_ptr->cost;
- X }
- X break;
- X case 19: /* Increase damage */
- X t_ptr->todam += m_bonus(1, 20, level);
- X t_ptr->cost += t_ptr->todam*100;
- X if (magik(cursed))
- X {
- X t_ptr->todam = -t_ptr->todam;
- X#ifdef ATARIST_MWC
- X t_ptr->flags |= (holder = TR_CURSED);
- X#else
- X t_ptr->flags |= TR_CURSED;
- X#endif
- X t_ptr->cost = -t_ptr->cost;
- X }
- X break;
- X case 20: /* Increase To-Hit */
- X t_ptr->tohit += m_bonus(1, 20, level);
- X t_ptr->cost += t_ptr->tohit*100;
- X if (magik(cursed))
- X {
- X t_ptr->tohit = -t_ptr->tohit;
- X#ifdef ATARIST_MWC
- X t_ptr->flags |= (holder = TR_CURSED);
- X#else
- X t_ptr->flags |= TR_CURSED;
- X#endif
- X t_ptr->cost = -t_ptr->cost;
- X }
- X break;
- X case 21: /* Protection */
- X t_ptr->toac += m_bonus(1, 20, level);
- X t_ptr->cost += t_ptr->toac*100;
- X if (magik(cursed))
- X {
- X t_ptr->toac = -t_ptr->toac;
- X#ifdef ATARIST_MWC
- X t_ptr->flags |= (holder = TR_CURSED);
- X#else
- X t_ptr->flags |= TR_CURSED;
- X#endif
- X t_ptr->cost = -t_ptr->cost;
- X }
- X break;
- X case 24: case 25: case 26:
- X case 27: case 28: case 29:
- X t_ptr->ident |= ID_NOSHOW_P1;
- X break;
- X case 30: /* Slaying */
- X t_ptr->ident |= ID_SHOW_HITDAM;
- X t_ptr->todam += m_bonus(1, 25, level);
- X t_ptr->tohit += m_bonus(1, 25, level);
- X t_ptr->cost += (t_ptr->tohit+t_ptr->todam)*100;
- X if (magik(cursed))
- X {
- X t_ptr->tohit = -t_ptr->tohit;
- X t_ptr->todam = -t_ptr->todam;
- X#ifdef ATARIST_MWC
- X t_ptr->flags |= (holder = TR_CURSED);
- X#else
- X t_ptr->flags |= TR_CURSED;
- X#endif
- X t_ptr->cost = -t_ptr->cost;
- X }
- X break;
- X default:
- X break;
- X }
- X break;
- X
- X case TV_AMULET: /* Amulets */
- X if (t_ptr->subval < 2)
- X {
- X if (magik(cursed))
- X {
- X t_ptr->p1 = -m_bonus(1, 20, level);
- X#ifdef ATARIST_MWC
- X t_ptr->flags |= (holder = TR_CURSED);
- X#else
- X t_ptr->flags |= TR_CURSED;
- X#endif
- X t_ptr->cost = -t_ptr->cost;
- X }
- X else
- X {
- X t_ptr->p1 = m_bonus(1, 10, level);
- X t_ptr->cost += t_ptr->p1*100;
- X }
- X }
- X else if (t_ptr->subval == 2)
- X {
- X t_ptr->p1 = 5 * m_bonus(1, 25, level);
- X if (magik(cursed))
- X {
- X t_ptr->p1 = -t_ptr->p1;
- X t_ptr->cost = -t_ptr->cost;
- X#ifdef ATARIST_MWC
- X t_ptr->flags |= (holder = TR_CURSED);
- X#else
- X t_ptr->flags |= TR_CURSED;
- X#endif
- X }
- X else
- X t_ptr->cost += 50*t_ptr->p1;
- X }
- X else if (t_ptr->subval == 8)
- X {
- X /* amulet of the magi is never cursed */
- X t_ptr->p1 = 5 * m_bonus(1, 25, level);
- X t_ptr->cost += 20*t_ptr->p1;
- X }
- X break;
- X
- X /* Subval should be even for store, odd for dungeon*/
- X /* Dungeon found ones will be partially charged */
- X case TV_LIGHT:
- X if ((t_ptr->subval % 2) == 1)
- X {
- X t_ptr->p1 = randint(t_ptr->p1);
- X t_ptr->subval -= 1;
- X }
- X break;
- X
- X case TV_WAND:
- X switch(t_ptr->subval)
- X {
- X case 0: t_ptr->p1 = randint(10) + 6; break;
- X case 1: t_ptr->p1 = randint(8) + 6; break;
- X case 2: t_ptr->p1 = randint(5) + 6; break;
- X case 3: t_ptr->p1 = randint(8) + 6; break;
- X case 4: t_ptr->p1 = randint(4) + 3; break;
- X case 5: t_ptr->p1 = randint(8) + 6; break;
- X case 6: t_ptr->p1 = randint(20) + 12; break;
- X case 7: t_ptr->p1 = randint(20) + 12; break;
- X case 8: t_ptr->p1 = randint(10) + 6; break;
- X case 9: t_ptr->p1 = randint(12) + 6; break;
- X case 10: t_ptr->p1 = randint(10) + 12; break;
- X case 11: t_ptr->p1 = randint(3) + 3; break;
- X case 12: t_ptr->p1 = randint(8) + 6; break;
- X case 13: t_ptr->p1 = randint(10) + 6; break;
- X case 14: t_ptr->p1 = randint(5) + 3; break;
- X case 15: t_ptr->p1 = randint(5) + 3; break;
- X case 16: t_ptr->p1 = randint(5) + 6; break;
- X case 17: t_ptr->p1 = randint(5) + 4; break;
- X case 18: t_ptr->p1 = randint(8) + 4; break;
- X case 19: t_ptr->p1 = randint(6) + 2; break;
- X case 20: t_ptr->p1 = randint(4) + 2; break;
- X case 21: t_ptr->p1 = randint(8) + 6; break;
- X case 22: t_ptr->p1 = randint(5) + 2; break;
- X case 23: t_ptr->p1 = randint(12) + 12; break;
- X default:
- X break;
- X }
- X break;
- X
- X case TV_STAFF:
- X switch(t_ptr->subval)
- X {
- X case 0: t_ptr->p1 = randint(20) + 12; break;
- X case 1: t_ptr->p1 = randint(8) + 6; break;
- X case 2: t_ptr->p1 = randint(5) + 6; break;
- X case 3: t_ptr->p1 = randint(20) + 12; break;
- X case 4: t_ptr->p1 = randint(15) + 6; break;
- X case 5: t_ptr->p1 = randint(4) + 5; break;
- X case 6: t_ptr->p1 = randint(5) + 3; break;
- X case 7: t_ptr->p1 = randint(3) + 1;
- X t_ptr->level = 10;
- X break;
- X case 8: t_ptr->p1 = randint(3) + 1; break;
- X case 9: t_ptr->p1 = randint(5) + 6; break;
- X case 10: t_ptr->p1 = randint(10) + 12; break;
- X case 11: t_ptr->p1 = randint(5) + 6; break;
- X case 12: t_ptr->p1 = randint(5) + 6; break;
- X case 13: t_ptr->p1 = randint(5) + 6; break;
- X case 14: t_ptr->p1 = randint(10) + 12; break;
- X case 15: t_ptr->p1 = randint(3) + 4; break;
- X case 16: t_ptr->p1 = randint(5) + 6; break;
- X case 17: t_ptr->p1 = randint(5) + 6; break;
- X case 18: t_ptr->p1 = randint(3) + 4; break;
- X case 19: t_ptr->p1 = randint(10) + 12; break;
- X case 20: t_ptr->p1 = randint(3) + 4; break;
- X case 21: t_ptr->p1 = randint(3) + 4; break;
- X case 22: t_ptr->p1 = randint(10) + 6;
- X t_ptr->level = 5;
- X break;
- X default:
- X break;
- X }
- X break;
- X
- X case TV_CLOAK:
- X if (magik(chance))
- X {
- X if (magik(special))
- X {
- X if (randint(2) == 1)
- X {
- X t_ptr->name2 = SN_PROTECTION;
- X t_ptr->toac += m_bonus(2, 40, level);
- X t_ptr->cost += 250;
- X }
- X else
- X {
- X t_ptr->toac += m_bonus(1, 20, level);
- X t_ptr->ident |= ID_SHOW_P1;
- X t_ptr->p1 = randint(3);
- X t_ptr->flags |= TR_STEALTH;
- X t_ptr->name2 = SN_STEALTH;
- X t_ptr->cost += 500;
- X }
- X }
- X else
- X t_ptr->toac += m_bonus(1, 20, level);
- X }
- X else if (magik(cursed))
- X {
- X tmp = randint(3);
- X if (tmp == 1)
- X {
- X t_ptr->flags |= TR_AGGRAVATE;
- X t_ptr->name2 = SN_IRRITATION;
- X t_ptr->toac -= m_bonus(1, 10, level);
- X t_ptr->ident |= ID_SHOW_HITDAM;
- X t_ptr->tohit -= m_bonus(1, 10, level);
- X t_ptr->todam -= m_bonus(1, 10, level);
- X t_ptr->cost = 0;
- X }
- X else if (tmp == 2)
- X {
- X t_ptr->name2 = SN_VULNERABILITY;
- X t_ptr->toac -= m_bonus(10, 100, level+50);
- X t_ptr->cost = 0;
- X }
- X else
- X {
- X t_ptr->name2 = SN_ENVELOPING;
- X t_ptr->toac -= m_bonus(1, 10, level);
- X t_ptr->ident |= ID_SHOW_HITDAM;
- X t_ptr->tohit -= m_bonus(2, 40, level+10);
- X t_ptr->todam -= m_bonus(2, 40, level+10);
- X t_ptr->cost = 0;
- X }
- X#ifdef ATARIST_MWC
- X t_ptr->flags |= (holder = TR_CURSED);
- X#else
- X t_ptr->flags |= TR_CURSED;
- X#endif
- X }
- X break;
- X
- X case TV_CHEST:
- X switch(randint(level+4))
- X {
- X case 1:
- X t_ptr->flags = 0;
- X t_ptr->name2 = SN_EMPTY;
- X break;
- X case 2:
- X t_ptr->flags |= CH_LOCKED;
- X t_ptr->name2 = SN_LOCKED;
- X break;
- X case 3: case 4:
- X t_ptr->flags |= (CH_LOSE_STR|CH_LOCKED);
- X t_ptr->name2 = SN_POISON_NEEDLE;
- X break;
- X case 5: case 6:
- X t_ptr->flags |= (CH_POISON|CH_LOCKED);
- X t_ptr->name2 = SN_POISON_NEEDLE;
- X break;
- X case 7: case 8: case 9:
- X t_ptr->flags |= (CH_PARALYSED|CH_LOCKED);
- X t_ptr->name2 = SN_GAS_TRAP;
- X break;
- X case 10: case 11:
- X t_ptr->flags |= (CH_EXPLODE|CH_LOCKED);
- X t_ptr->name2 = SN_EXPLOSION_DEVICE;
- X break;
- X case 12: case 13: case 14:
- X t_ptr->flags |= (CH_SUMMON|CH_LOCKED);
- X t_ptr->name2 = SN_SUMMONING_RUNES;
- X break;
- X case 15: case 16: case 17:
- X t_ptr->flags |= (CH_PARALYSED|CH_POISON|CH_LOSE_STR|CH_LOCKED);
- X t_ptr->name2 = SN_MULTIPLE_TRAPS;
- X break;
- X default:
- X t_ptr->flags |= (CH_SUMMON|CH_EXPLODE|CH_LOCKED);
- X t_ptr->name2 = SN_MULTIPLE_TRAPS;
- X break;
- X }
- X break;
- X
- X case TV_SLING_AMMO: case TV_SPIKE:
- X case TV_BOLT: case TV_ARROW:
- X if (t_ptr->tval == TV_SLING_AMMO || t_ptr->tval == TV_BOLT
- X || t_ptr->tval == TV_ARROW)
- X {
- X /* always show tohit/todam values if identified */
- X t_ptr->ident |= ID_SHOW_HITDAM;
- X
- X if (magik(chance))
- X {
- X t_ptr->tohit += m_bonus(1, 35, level);
- X t_ptr->todam += m_bonus(1, 35, level);
- X /* see comment for weapons */
- X if (magik(3*special/2))
- X switch(randint(10))
- X {
- X case 1: case 2: case 3:
- X t_ptr->name2 = SN_SLAYING;
- X t_ptr->tohit += 5;
- X t_ptr->todam += 5;
- X t_ptr->cost += 20;
- X break;
- X case 4: case 5:
- X#ifdef ATARIST_MWC
- X t_ptr->flags |= (holder = TR_FLAME_TONGUE);
- X#else
- X t_ptr->flags |= TR_FLAME_TONGUE;
- X#endif
- X t_ptr->tohit += 2;
- X t_ptr->todam += 4;
- X t_ptr->name2 = SN_FIRE;
- X t_ptr->cost += 25;
- X break;
- X case 6: case 7:
- X t_ptr->flags |= TR_SLAY_EVIL;
- X t_ptr->tohit += 3;
- X t_ptr->todam += 3;
- X t_ptr->name2 = SN_SLAY_EVIL;
- X t_ptr->cost += 25;
- X break;
- X case 8: case 9:
- X t_ptr->flags |= TR_SLAY_ANIMAL;
- X t_ptr->tohit += 2;
- X t_ptr->todam += 2;
- X t_ptr->name2 = SN_SLAY_ANIMAL;
- X t_ptr->cost += 30;
- X break;
- X case 10:
- X t_ptr->flags |= TR_SLAY_DRAGON;
- X t_ptr->tohit += 3;
- X t_ptr->todam += 3;
- X t_ptr->name2 = SN_DRAGON_SLAYING;
- X t_ptr->cost += 35;
- X break;
- X }
- X }
- X else if (magik(cursed))
- X {
- X t_ptr->tohit -= m_bonus(5, 55, level);
- X t_ptr->todam -= m_bonus(5, 55, level);
- X#ifdef ATARIST_MWC
- X t_ptr->flags |= (holder = TR_CURSED);
- X#else
- X t_ptr->flags |= TR_CURSED;
- X#endif
- X t_ptr->cost = 0;
- X }
- X }
- X
- X t_ptr->number = 0;
- X for (i = 0; i < 7; i++)
- X t_ptr->number += randint(6);
- X if (missile_ctr == MAX_SHORT)
- X missile_ctr = -MAX_SHORT - 1;
- X else
- X missile_ctr++;
- X t_ptr->p1 = missile_ctr;
- X break;
- X
- X case TV_FOOD:
- X /* make sure all food rations have the same level */
- X if (t_ptr->subval == 90)
- X t_ptr->level = 0;
- X /* give all elvish waybread the same level */
- X else if (t_ptr->subval == 92)
- X t_ptr->level = 6;
- X break;
- X
- X case TV_SCROLL1:
- X /* give all identify scrolls the same level */
- X if (t_ptr->subval == 67)
- X t_ptr->level = 1;
- X /* scroll of light */
- X else if (t_ptr->subval == 69)
- X t_ptr->level = 0;
- X /* scroll of trap detection */
- X else if (t_ptr->subval == 80)
- X t_ptr->level = 5;
- X /* scroll of door/stair location */
- X else if (t_ptr->subval == 81)
- X t_ptr->level = 5;
- X break;
- X
- X case TV_POTION1: /* potions */
- X /* cure light */
- X if (t_ptr->subval == 76)
- X t_ptr->level = 0;
- X break;
- X
- X default:
- X break;
- X }
- X}
- X
- X
- Xstatic struct opt_desc { char *o_prompt; int *o_var; } options[] = {
- X { "Running: cut known corners", &find_cut },
- X { "Running: examine potential corners", &find_examine },
- X { "Running: print self during run", &find_prself },
- X { "Running: stop when map sector changes", &find_bound },
- X { "Running: run through open doors", &find_ignore_doors },
- X { "Prompt to pick up objects", &prompt_carry_flag },
- X { "Rogue like commands", &rogue_like_commands },
- X { "Show weights in inventory", &show_weight_flag },
- X { "Highlight and notice mineral seams", &highlight_seams },
- X { "Beep for invalid character", &sound_beep_flag },
- X { "Display rest/repeat counts", &display_counts },
- X { 0, 0 } };
- X
- X
- X/* Set or unset various boolean options. -CJS- */
- Xvoid set_options()
- X{
- X register int i, max;
- X vtype string;
- X
- X prt(" ESC when finished, y/n to set options, <return> or - to move cursor",
- X 0, 0);
- X for (max = 0; options[max].o_prompt != 0; max++)
- X {
- X (void) sprintf(string, "%-38s: %s", options[max].o_prompt,
- X (*options[max].o_var ? "yes" : "no "));
- X prt(string, max+1, 0);
- X }
- X erase_line(max+1, 0);
- X i = 0;
- X for(;;)
- X {
- X move_cursor(i+1, 40);
- X switch(inkey())
- X {
- X case ESCAPE:
- X return;
- X case '-':
- X if (i > 0)
- X i--;
- X else
- X i = max-1;
- X break;
- X case ' ':
- X case '\n':
- X case '\r':
- X if (i+1 < max)
- X i++;
- X else
- X i = 0;
- X break;
- X case 'y':
- X case 'Y':
- X put_buffer("yes", i+1, 40);
- X *options[i].o_var = TRUE;
- X if (i+1 < max)
- X i++;
- X else
- X i = 0;
- X break;
- X case 'n':
- X case 'N':
- X put_buffer("no ", i+1, 40);
- X *options[i].o_var = FALSE;
- X if (i+1 < max)
- X i++;
- X else
- X i = 0;
- X break;
- X default:
- X bell();
- X break;
- X }
- X }
- X}
- END_OF_FILE
- if test 26765 -ne `wc -c <'source/misc2.c'`; then
- echo shar: \"'source/misc2.c'\" unpacked with wrong size!
- fi
- # end of 'source/misc2.c'
- fi
- echo shar: End of archive 27 \(of 39\).
- cp /dev/null ark27isdone
- MISSING=""
- 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
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 39 archives.
- echo "Now run "bldfiles.sh" to build split files"
- rm -f ark[1-9]isdone ark[1-9][0-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-