Resting: special cases
The party · Resting · Conditions · Characters of the game
In brief
What each condition allows during a rest, the departure of Insal after a long rest, and the anomalies of the rest: food is never consumed, healers cast whatever their condition, mage spells come back more slowly than cleric spells, and a monster turned to stone still forbids resting.
Conditions while resting
| Condition | Recovers spells | Regains 1 hit point every 8 hours | Healed by the healers | Lets the game offer healing as a healer |
|---|---|---|---|---|
| Poisoned | yes | yes; loses 10 every hour | yes | yes |
| Paralyzed | yes | yes | yes | no |
| Unconscious (0 to −9 hp) | no | yes | yes | no |
| Turned to stone | no | no | no | no |
| Dead (−10 hp or less) | no | no | no | no |
| Living, without food | no | no; loses 1 every 24 hours | yes | yes |
Once healing is accepted, every healer casts, in any of these conditions.
Insal leaves
After a rest of more than four hours ended without monsters or defeat,
the game looks for Insal: the last living character whose portrait
number is −1, the number of the character that
SCRIPT_SEQUENCE_NPC_INSAL
recruits. When Insal is there and at least five characters are present:1
- Insal is removed from the party. If Insal was in one of the first four slots, the character in slot 5, or in slot 4 when slot 5 is empty, moves into the freed slot.
- Bits 1 and 2 of the global script flags are cleared.
- Items are taken from the present characters, in slot order, from every
inventory slot except slot 16, and removed from the game: one
ITEM_TYPE_LONG_SWORDof value 1 or more, or failing that oneITEM_TYPE_SHORT_SWORDof value 1 or more; up to threeITEM_TYPE_RATIONSof value 0 or more; up to threeITEM_TYPE_POTIONof value 1; up to twoITEM_TYPE_RINGof value 0 or more. - A copy of item 28 of the item table, a Parchment in the initial
ITEM.DAT, is placed in the party's block with value 26. - The game shows "As you awaken, you discover that Insal the thief is gone!" and "A quick inventory reveals equipment has been stolen!".
Read, the parchment shows text 27 of TEXT.DAT, as
for any parchment: a note signed by Insal, who excuses
himself for leaving with a few things, followed by a hint about the
north-eastern wall near his old cell.
The precondition of ANOMALY-120 can arise in
ordinary play (inferred): Insal joins on level 1, before the party reaches
Shorn on level 2 (the anomaly).
Anomalies while resting
Resting never consumes food. Every eight hours, the rest takes 5 points of
food from a character, or all of its last 5, only when the
ring search for an ITEM_TYPE_RING
of value 2 returns a negative value; the search returns 0 or 1, so the
consumption never happens and no character starts starving during a rest.
The food update has the mirror test and never spares a
character. A faithful reimplementation leaves food unchanged during a rest
and still applies the hunger damage to characters already without
food.2
Once the player accepts the healers, the healing step does not test the healers' condition. A healer that is unconscious, paralyzed, turned to stone or dead still casts its ready cure spells on the target; only the question needs one healer able to act. A faithful reimplementation applies no condition test in the healing step.3
Spell recovery divides the slot index by ten for cleric slots, as the slots are stored in groups of ten, but by six for mage slots. A used mage slot therefore waits as if it were in a later group: an index from 30 to 39, in the fourth group, waits 6 or 7 steps after the previous recovery instead of 4, and the scan of mage slots stops earlier for a given counter. A faithful reimplementation keeps the divisor of six.4
A monster turned to stone still keeps the party from resting. The rest's monster check ignores only peaceful monsters, while the monster update and the idle animation treat a monster turned to stone as gone; a held monster counts too. A petrified monster within one block of the party therefore keeps "You can't rest here, monsters are near." until the party moves away or destroys it. A faithful reimplementation applies the same test.5
ANOMALY-146 — When the eight-hour Lay on Hands restore finds neither a ready nor a used
copy among a paladin's first ten cleric slots, it looks for an empty one and
writes to the result without testing it. With no empty slot, the search
returns a null pointer and the value 28 goes to the very start of memory,
outside the game's data. The case is latent: a paladin has at most three level-1
slots, plus Turn undead and this copy of Lay on Hands, so an empty slot
always remains among the ten. A faithful reimplementation has nothing to
reproduce.2
Sources
Locations refer to the game executable reference;
comparative sources are listed in the technical references.
The figures are drawn by make_party_figures.py.