I7 syntax question--understand a kind as.

If you make magic-spells into a kind of value, you can use understanding by properties. You can even just say

A magicscroll has a magic-spell.

instead of giving it a named property, and that lets you define scrolls by saying “A Withered Hand magicscroll is in Test Lab.” See the example “Early Childhood 4” in the documentation. (When I had “A magicscroll has a magic-spell called recordedSpell” that stopped working, and getting the scrolls to have the right spells got very annoying.)

So:

a magic-spell is a kind of value. The magic-spells are Withered Hand and Finger of Death.
A magicScroll is a kind of thing. A magicScroll has a magic-spell. understand "scroll" as magicScroll. understand "scrolls" as the plural of a magicScroll. Understand "scroll of" as a magicScroll.
Understand the magic-spell property as describing a magicScroll.

Test Lab is a room.

For printing the name of a magicScroll: say "scroll of [magic-Spell of the item described]".

There is a Finger of Death magicscroll in Test Lab. 
There is a Withered Hand magicScroll in Test Lab.

test me with "take scroll/finger of death/i/l/take scroll".

This has some advantages over understanding by relations–in particular, I think that if the only difference between two scrolls is the things that they’re related to, Inform will treat them as indistinguishable objects even if the player can in fact distinguish them by referring to the related objects. This means that it will just list two different scrolls as “two scrolls,” and if you type “take scroll” will just pick the first-defined scroll rather than disambiguating. So if we try Björn’s code with another scroll:

A spell is a kind of thing.
A scroll is a kind of thing. 

Inscription relates a spell to a scroll. The verb to be inscribed on implies the inscription relation. The verb to bear implies the reversed inscription relation.
Understand "[something related by reversed inscription]" as a scroll.
Understand "scroll of/-- [something related by reversed inscription]" as a scroll.
Understand "blank scroll" as a scroll when there is nothing inscribed on the item described.

Rule for printing the name of a scroll (called item):
	if something (called magic) is inscribed on the item, say "scroll of [the magic]";
	otherwise say "blank scroll".

The Withered Hand is a spell. Finger of Death is a spell.

Home is a room.
There is a scroll bearing the Withered Hand. It is in Home.
There is a scroll bearing Finger of Death. It is in Home.

we run into some trouble:

Home
You can see two scrolls here.

>take scroll
Taken.

>i
You are carrying:
  a scroll of the Withered Hand

>l
Home
You can see a scroll of Finger of Death here.

>

…so if you don’t need spells to be tangible objects, I’d advise making them into values and using understanding by properties.

1 Like