Spells
Magic Lock
- Will also close the door in addition to locking it, saving a turn.
Earthquake
- Anywhere Earthquake generates rocks will be turned into a normal ground tile -- this can be used to destroy water tiles and make them passable.
Learning Spells
Well, here's a basic overview of what is factored in (in order of
application) to what determines if you successfully read the book:
We start off with a difficulty based on the specific spellbook
(Darkness and Light are rather low, Wish is really high)
The 'shelves and books' room effect helps.
Learning is counted in next.
Druids, Priests, Wizards, and Necromancers get a bonus.
You get a minus if drunk.
Cursed gets a minus, blessed gets a bonus.
Then Druids, Priests, Wizards, Necromancers, and Elementalists get
another bonus (Elementalists for the first time) based on the PC's
level. Then most classes get a smaller bonus based on their level.
Mindcrafters and Trolls, however, don't get this bonus at all.
Next, Literacy and Concentration are factored in.
Necromancers and druids both get a bonus for their guaranteed starting
books, frost bolt and lightning bolt, respectively.
After that you get a bonus if you're born in the month of the book.
All of this combines together for some kind of base value. It's pretty
complicated so I'm just giving an overview for now instead of
specifics. Now you choose whether to cast or read the book. If you
read it...
Now there's a straight up literacy roll. Basically, your literacy
skill is a percentage chance of successfully reading the book. If you
fail the check, you 'cannot decipher the runes' and nothing else
happens. Now the base value is checked against a d100. If you
succeed, I think it then starts counting up how much to increase your
knowledge of the spell:
There's a check that's gives you a better bonus if you already have at
least 30 skill points in the book, and also depends on learning.
Next your PC's level is factored in again.
Continuing on, The Cup birthsign is now factored in - so Book increases
the chances of successfully reading a book, while Cup increases how
much you learn from reading it.
After that the good & great book learning talents are factored in. (so
they, too, only increase the amount learned, not the chance of learning).
If you fail to read the book successfully, it depends on all these
previous factors plus a base value for each class (shown below) your
chances of the book doing something nasty versus your chances to just
not learning anything.
50 - Wizard, Elementalist
40 - Priest, Necromancer
35 - Healer
30 - Bard, Druid
25 - Paladin, Ranger
20 - Thief, Assassin, Monk, Weaponsmith, Beastfighter, Merchant
15 - Fighter, Archer
10 - Farmer
-10 - Mindcrafter
-20 - Barbarian
Do note that this only determines the chances for something bad
happening here, nothing else.
If you fail this check, random chance of:
Spellbook bursting into flames, power drained, feel hollow, confused,
stunned, life force drained, explodes in a fireball, blindness, dizzy,
drains health (this lowers toughness by 1), spellbook vanish, or pit
creation.
A few other side notes:
If a pit is created from reading a book while you're standing on a
grave, it'll dig the grave =)
If you have 0 knowledge in a spell, your learning stat appears to be
trained about 4 times as much as it would be otherwise. (The training
is based on the spell's difficulty)
To sum up, it depends on: Class (pretty self explanatory to the extent
spellcasters read better), birthsign, whether you're drunk, the
difficulty of the spellbook, room effect, and if you're a troll. Also
B/U/C status, Learning, Concentration, Literacy, and the PC's level
factor in - the higher of these the better.
Starting Books
- Salamander Wizards always starts with Fire Bolt
- Necromancers always get Frost Bolt
- Druids always get Lightning Bolt
Spellbook Generation Rate
- Wizards, Priests, Druids, Necromancers: 20000
- Paladins: 5000
- Everybody else: 2000
Spell Probabilities
Arcane
- 0.031%: Wish
- 0.123%: Create Item, Earthquake, Greater Identify, Heal, Identify, Petrification
- 0.613%: Cure Critical Wounds, Cure Serious Wounds, Death Ray, Destroy Undead, Improved Fireball, Mystic Shovel, Summon Monsters
- 1.225%: Acid Ball, Acid Bolt, Bless, Cure Disease, Disarm Trap, Farsight, Fireball, Ice Ball, Know Alignment, Lightning Ball, Magic Map, Neutralize Poison, Remove Curse, Revelation, Scare Monster
- 3.063%: Burning Hands, Calm Monster, Cure Light Wounds, Fire Bolt, Frost Bolt, Invisibility, Lightning Bolt, Magic Lock, Slow Poison, Strength of Atlas, Stun Ray, Teleportation, Web
- 6.126%: Knock, Magic Missile, Slow Monster
- 9.188%: Darkness, Light
Druids & Priests
- 0.029%: Wish
- 0.117%: Acid Ball, Create Item, Fireball, Greater Identify, Ice Ball, Identify, Improved Fireball, Lightning Ball
- 0.586%: Death Ray, Earthquake, Heal, Invisibility, Mystic Shovel, Summon Monsters
- 1.172%: Acid Bolt, Cure Critical Wounds, Farsight, Knock, Magic Lock, Magic Map, Magic Missile, Petrification, Remove Curse, Scare Monster, Slow Monster, Strength of Atlas, Teleportation, Web
- 2.930%: Burning Hands, Calm Monster, Cure Serious Wounds, Disarm Trap, Fire Bolt, Frost Bolt, Know Alignment, Lightning Bolt, Neutralize Poison, Revelation, Stun Ray
- 5.860%: Bless, Cure Disease, Cure Light Wounds, Destroy Undead, Slow Poison
- 8.790%: Darkness, Light
Spellbooks
There are two very different things you can do with spellbooks, learning and casting. To cast, you must already know the book's spell; bookcasting costs 3000 energy and thrice, twice, or half again more power than normal casting depending on talents. It does not add effectivity or deplete knowledge. The remainder of this section will be dedicated to learning.
Reading a spellbook takes 3 + base cost turns, succeed or fail.
There are 11 possible bonuses to learning a spell. They are added together to gain the percentage chance of success.
- Priests and wizards have +30, mindcrafters -40, other classes in between.
- Learning skill: 1/8 for Barbarians, 3 for Wizards, and in between for others.
- Spell-specific factor: Farsight has +6, Wish has -100, other spells in between.
- Spell type: Pure spellcasters (except elementalists) attempting to learn purely arcane spells get -10, other combinations get +10. This is probably a bug; wizards are penalized for arcane spells.
- Penalized -1 per remaining turn of drunkenness.
- +20 for a blessed book and -20 for cursed.
- Level: Pure spellcasters gain 2*level with a maximum of 75. All other non-Mindcrafter non-trolls get 1*level. Mindcrafters and trollish non-casters get nothing.
- +1 per 5 Concentration.
- +1 per 10 Literacy.
- Druids and Necromancers receive +40 for their specific starting book.
- Characters born under Book receive +20.
- Now, there is a straight Literacy check - no effect good or bad will occur unless you make a Literacy in 100 check (max 99%).
- Next, a 1d100 is compared to your total success. If it's less or equal, you succeeded; the amount of knowledge you gain depends on the margin of success (total bonuses - die roll). If it comes up higher, you fail. There is a margin of safety depending on your class. Wizards and Elementalists need to flub the success roll by a margin of 50 or more to see a bad effect; if their basic success chance is at least 50, they will obviously never see any bad effect. Barbarians and Mindcrafters have no margin; every failure is bad. If the die landed in the margin zone, no good or bad effect occurs.
On bad failure:
There are 11 equally probable failure modes. 1. Spellbook bursts into flames and is destroyed. Lose spellbook, no further effect. 2. Your magical energy drains away. Deduct twice the spells base cost. No effect if PP already 0. 3. You are confused for 5dCOST turns. 4. You are stunned for 4d(COST/2) turns. 5. You take 1dCOST damage. (Spellbooks of wish are dangerous things…) 6. Spellbook “explodes” in a ball of fire. Take 4d(COST/4) FIRE damage and inventory damaged as for fire, but no actual explosion occurs. Spellbook destroyed. 7. You are blinded for 2dCOST turns. 8. You are teleported. On a non-teleport level, confuse 5d5 turns instead. 9. -1 Toughness, permanently. 10. The spellbook suddenly is gone! 11. A pit opens up beneath you! Yes, counts as gravedigging.
On success:
You gain castings and train Learning. Learning training is 2*base cost, or base cost / 2 if you had castings already.
Castings gained are initially min(200 + Le*4, max(20, max(5, success margin - existing castings) * max(1, Le / 4))). If you have 30 or more castings, the formula used is instead max(5, max(1, Le/8) * success margin).
Casting gain is reduced by existing castings and level - it is multiplied by 100 - 3 * (castings / 50 + level / 3) and divided by 100. Reduction is never worse than a 25% multiplier and never reduces below 1.
Cup is +20%, Good and Great Book Learner are each +10%.
Successfully reading a book deducts one charge. Books start with 2d3 charges and disappear when it reaches 0.
Tracts
Reading a tract modifies your alignment, piety, and corruption state.
Tracts have finite uses, measured in turns of reading. This is initially set to 1d1000 for a brand new tract. Each time you attempt to read a tract, you will spend 20d10 turns reading it, or the remaining time, whichever is smaller.
While you are reading a tract, your body armor cannot be damaged, and teleportitis is disabled, in addition to the normal effects of a long action.
If you are interrupted, no further effect will occur. There is code which appears to give a reduced effect if spent less turns, but it has no effect because you don't get any further than here if interrupted.
In the formulae below, T is the number of turns spent on this reading.
Piety effects from reading tracts are “raw” piety changes; they do not result in the typical -1/30 other god effect. If your piety with some god is reduced to or below -500 by a tract, you will suffer negative piety effects (inventory cursing, etc), unless your god deflects them. Your god will never deflect his own penalties, and will deflect the penalties of other gods if and only if your piety with your current god is greater than one-eighth of the absolute value of the punishing god. Deflection does not cost piety.
Angering the neutral god with a tract is incorrectly reported as “the anger of Order”.
Tract effects:
| Tract | Corruption | Lawful piety | Neutral piety | Chaotic piety | Alignment |
| order | -T CPs | +T/2 | -T/2 | -T/2 | T/10 stones towards L+ |
| balance | No effect | No change | +T | No change | T/10 stones towards N= |
| chaos | +T CPs | -T*2 | -T*2 | +T*2 | T/10 stones towards C- |
Black Tome of Alsophocus
Corrupts while merely carried. When you finish reading it, you are additionally corrupted by 20 points per turn spent, minimum 200, maximum 6666. Therefore, you should always read the black tome in half reading time rooms. Additionally, you should have a wimpy monster near you; if the reading goes on for too many turns, allow yourself to be interrupted to avoid massive corruption.
The black tome counts as a book of a uniform random spell; Wish and Darkness are equally likely.
The black tome cannot be destroyed. If a failure would destroy it, the next entry in the list is used instead.
Pay attention to the weights of books. The Black Tome of Alsophocus is (400s). A black tome (100s) is an ordinary spellbook.