X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=chapters%2F08.rst;h=cf555a3429229fcc2f04570306234016ff7771a6;hb=d102cdffefa7d68901d9f6e7d564656270bd0280;hp=cf3f53ac80878655b3178bd712301ca06ebf33aa;hpb=21a2902d175911ef3650ed613b580ffdc7e58754;p=ibg.git diff --git a/chapters/08.rst b/chapters/08.rst index cf3f53a..cf555a3 100644 --- a/chapters/08.rst +++ b/chapters/08.rst @@ -2,7 +2,7 @@ William Tell: in his prime ============================ -.. highlight:: inform6 +.. highlight:: inform .. epigraph:: @@ -23,6 +23,8 @@ chapter we define the square's constituent rooms and deal with Wilhelm's approach to the hat on the pole -- does he salute it, or does he remain proudly defiant? +.. _south-side: + The south side of the square ============================ @@ -81,9 +83,8 @@ The obnoxious soldiers are also implemented very sketchily; they need to be there, but they don't do much. Their most interesting characteristic is probably that they trap two actions -- ``FireAt`` and ``Talk`` -- which are *not* part of the library, but instead new actions that we've defined -specially for this game. We'll talk about those actions in "Verbs, verbs, -verbs" on page 111, at which time the role of this ``before`` property will -make more sense. +specially for this game. We'll talk about those actions in :ref:`verbs`, +at which time the role of this ``before`` property will make more sense. The middle of the square ======================== @@ -208,8 +209,8 @@ that the salute was "gratefully" received. Creating new property variables like this -- at the drop of a hat, as it were -- is the recommended approach, but it isn't the only possibility. - We briefly mention some alternative approaches in "Reading other - people's code" on page 181. + We briefly mention some alternative approaches in + :ref:`reading-other-code`. Back to the ``mid_square`` room. We've said that we need to detect Wilhelm trying to leave this room, which we can do by trapping the ``Go`` action in @@ -564,8 +565,8 @@ the end of every turn; these are the values that it's expecting to find: * 2 -- the game is over. The interpreter displays "You have won". * any other value -- the game is over, but there aren't any appropriate messages built into the library. Instead, the interpreter looks for an - **entry point** routine called ``DeathMessage`` -- which we must provide - -- where we can define our own tailored "end messages". + :term:`entry point` routine called ``DeathMessage`` -- which we must + provide -- where we can define our own tailored "end messages". In this game, we never set ``deadflag`` to 1, but we do use values of 2 and 3. So we'd better define a ``DeathMessage`` routine to tell players