Magic
From IFWiki
Classsic Examples
- Enchanter (Marc Blank and Dave Lebling, publisher Infocom, 1983, Z-code)
- Dreamhold ([[Andrew Plotkin, 2004, Z-code)
- Savoir-Faire (Emily Short, 2002, Z-code)
Approaches
- Spells may be cast by the use of dedicated verbs, often unusual words such as GNUSTO or PLUGH. This is a common feature of Zorkian fantasy. Either the author should explain these in the ABOUT text, or they should be learnt over the course of gameplay.
- Various objects may have magical properties:
- Magic may just be used as an extension of the player's body, with no special syntax; the player might use a spell to UNLOCK DOOR, for instance.
- Magic may lie in the proper arrangement of various spell components (see also alchemy).
Advantages
- Like sufficiently advanced technology, magic can be used to justify virtually any world behaviour.
Disadvantages
- The player will have to learn how the magic system works. This can be fun in itself if handled properly, but if bungled it can be confusing and frustrating.
- Broad-purpose magic effects can impose a very heavy coding burden. A sword enchanted to be a bit sharper isn't, for the purposes of coding, a great deal different from a normal sword; a player endowed with telepathy or control over atomic structure is going to cause a lot more problems.