Part 2 - Actions
Chapter 1 - Changing into
Changing it into is an action applying to two visible things. [1]
Understand "change [something] into/to [any thing]" as changing it into.
Understand "turn [something] into [any thing]" as changing it into.
Understand the command "sparkle" as "change".
First check changing into when the noun is the second noun: [2]
say "[The noun] [are] already [a noun]." instead.
First check changing yourself into something:
try changing yourself vaguely into instead.
Check changing into when the noun does not equal the second noun:
say "[A second noun] [are] not the true nature of [the noun]." instead.
Check changing into when the noun equals the second noun and the second noun is unfamiliar:
say "[We] [haven't] had that revelation yet. [We] must meditate to find that information." instead.
Carry out changing into:
if the noun is part of something (called the keeper):
now the second noun is part of the keeper;
otherwise if the second noun is the dog and the holder of the noun is the player:
now the dog is in the holder of the player;
otherwise if the second noun is the dog and (the noun is on a portable supporter or the noun is in a portable container):
now the dog is in the location;
otherwise:
now the second noun is in the holder of the noun;
remove noun from play;
set pronouns from the second noun. [3]
Report changing into:
say "[The noun] [sparkle] for a brief moment before changing into [a second noun]."
Does the player mean changing something into when the noun equals the second noun and the noun equals a familiar thing:
it is very likely.
Does the player mean changing something into when the noun is the second noun:
it is unlikely.
Notes
[1]. This is one of the most counterintuitive syntaxes in Inform. Saying that the action applies to visible things does not necessarily mean that the player must see them; it only removes the touchability requirement. The changing into action must apply to visible things because firstly being able to touch them is not a requirement and secondly the second noun is always out of play. Without the "visible" modifier the parser would always show a "you can't reach it" error.
[2]. This (and the next one) must be a "first check" rule, otherwise the more specific "check ... when the noun does not equal the second noun" takes precedence.
[3]. Changing things into other things is, of course, smoke and mirrors. What actually happens is that the original thing is removed from play and the new thing appears in its place. The player might then refer to the new noun using a pronoun (>CHANGE DOG INTO FLUTE. TAKE IT.) so we'll set the pronoun manually.