``pname.h`` right after it. ``Replace`` tells the compiler that we're
providing replacements for some standard routines.
-.. code-block:: inform6
+.. code-block:: inform
Constant Story "Captain Fate";
Constant Headline
Maybe specially highlight the lines using pname?
-.. code-block:: inform6
+.. code-block:: inform
Object toilet_door
with pname '.x' 'red' '.x' 'toilet' 'door',
while leaving the ``outside_of_toilet`` unchanged:
-.. code-block:: inform6
+.. code-block:: inform
Object outside_of_toilet "toilet" cafe
with name 'toilet' 'bath' 'rest' 'room' 'bathroom' 'restroom',
about sums it all up; pretty simple to describe -- not so simple to
code. Remember Benny's basic definition from the previous chapter:
-.. code-block:: inform6
+.. code-block:: inform
Object benny "Benny" cafe
with name 'benny',
We can now add some complexity, beginning with a ``life`` property. In
generic form:
-.. code-block:: inform6
+.. code-block:: inform
life [;
Give: !... code for giving objects to Benny
We have seen some of these actions before. We'll take care of the easier
ones:
+.. code-block:: inform
+
Attack:
if (costume has worn) {
deadflag = 4;
returned. The solution, yet again (this really is a most useful
capability), is more local property variables:
-.. code-block:: inform6
+.. code-block:: inform
Object benny "Benny" cafe
with name 'benny',
come to the ``Give`` action of the ``orders`` property, which deals with
commands like BENNY, GIVE ME THE KEY):
-.. code-block:: inform6
+.. code-block:: inform
Give:
switch (noun) {
the object offered to the NPC. Remember that we can use the ``switch``
statement as shorthand for:
-.. code-block:: inform6
+.. code-block:: inform
if (noun == costume) { whatever };
if (noun == clothes) { whatever };
like ASK BENNY FOR THE KEY or BENNY, GIVE ME THE KEY. The syntax is
similar to that of the ``life`` property:
-.. code-block:: inform6
+.. code-block:: inform
orders [; ! handles ASK BENNY FOR X and BENNY, GIVE ME XXX
Give:
We must revisit the café room object:
-.. code-block:: inform6
+.. code-block:: inform
Room cafe "Inside Benny's cafe"
with description
room before the movement actually takes place, a good moment to
interfere if we want to prevent escape. The first line:
-.. code-block:: inform6
+.. code-block:: inform
if (noun ~= s_obj) return false;
The first three are covered by the test:
-.. code-block:: inform6
+.. code-block:: inform
if (benny.coffee_not_paid == true || benny.key_not_returned == true) ...