summaryrefslogtreecommitdiff
path: root/npc/doc/magic
blob: 3e5863e0c29816eff189aebd833cbe827c7a1ae2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Nibble use:
---------------
== QUEST_MAGIC
  N0, N1:  Auldsbel
  N2: druid tree quest, mouboo quest (shared)
  N3: Sagatha unhappiness counter
  N4, N5: Sagatha
  N6, N7: Swords
== QUEST_MAGIC2
  N0: Evil Earth Spirit
  N1: Elanore
  N2: Wyara
  N3: Elanore subquests (Cure Kadiya)
  N4-N7:  may be messy at this point

The various magic scripts pack their status into these variables.
Locally, they use `@Q_status' to maintain the state, and use a function
`S_update_var' to update it.  This is all re-using the same code, setting
the `@Q_MASK' and `@Q_SHIFT' variables appropriately.

  There are a few exceptions (such as the Kadiya quest) wherein
a separate helper function sets a dedicated local variable, or some hackery
in Auldsbel wherein we read stati directly, merely to enable certain options.