Skip to main content

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.

What happens at the end of a rest of more than four hours that ends without monsters or defeat. If Insal is living and at least five characters are present, Insal leaves the party and a back character fills the slot; two global flags are cleared; swords, rations, potions and rings are taken; a parchment is left in the party's block; two messages are shown. Otherwise nothing happens.
Insal leaves only after a long, uneventful rest with a party of five or six.

Conditions while resting​

ConditionRecovers spellsRegains 1 hit point every 8 hoursHealed by the healersLets the game offer healing as a healer
Poisonedyesyes; loses 10 every houryesyes
Paralyzedyesyesyesno
Unconscious (0 to −9 hp)noyesyesno
Turned to stonenononono
Dead (−10 hp or less)nononono
Living, without foodnono; loses 1 every 24 hoursyesyes

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

  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.
  2. Bits 1 and 2 of the global script flags are cleared.
  3. 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_SWORD of value 1 or more, or failing that one ITEM_TYPE_SHORT_SWORD of value 1 or more; up to three ITEM_TYPE_RATIONS of value 0 or more; up to three ITEM_TYPE_POTION of value 1; up to two ITEM_TYPE_RING of value 0 or more.
  4. 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.
  5. 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​

Anomaly

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

Anomaly

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

Anomaly

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

Anomaly

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

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.

Footnotes​

  1. Insal leaves, with remove a character, swap two characters, remove items from the party, duplicate an item and the global script flags; the text is read by read a parchment. Comparative source: REF-SCUMM-019, DarkMoonEngine::restParty_npc. ↩

  2. The hour marks and end tests of the rest routine, with the shared counter, damage, the ring search and the party status check. Comparative source: REF-SCUMM-019, restParty. ↩ ↩2

  3. The healing step of the rest routine, with the most injured character, has a cure spell, the class components and the dice. Comparative source: REF-SCUMM-019, restParty, restParty_getCharacterWithLowestHp and restParty_checkHealSpells. ↩

  4. Recover a spell in the rest routine, with the inventory search and spells left to recover. Comparative source: REF-SCUMM-019, restParty and restParty_checkSpellsToLearn. ↩

  5. Rest with the rest texts, the rest refusal flag, the monster rounds, the distance between two blocks and the dream sequence with its picture name. Comparative source: REF-SCUMM-019, restParty, restParty_updateMonsters and restParty_extraAbortCondition. ↩