Another use of state_change().
authorEric S. Raymond <esr@thyrsus.com>
Tue, 4 Jul 2017 12:16:10 +0000 (08:16 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Tue, 4 Jul 2017 12:16:10 +0000 (08:16 -0400)
actions.c
adventure.yaml

index 7e1cc704f54925bc121d8077471aa60e0c09b25f..de888d4584d1f1528378324ff5b3f50f84e22d3c 100644 (file)
--- a/actions.c
+++ b/actions.c
@@ -482,13 +482,12 @@ static int discard(token_t verb, token_t obj, bool just_do_it)
             DESTROY(BIRD);
             return GO_CLEAROBJ;
         } else if (obj == BEAR && AT(TROLL)) {
             DESTROY(BIRD);
             return GO_CLEAROBJ;
         } else if (obj == BEAR && AT(TROLL)) {
-            rspeak(TROLL_SCAMPERS);
+            state_change(TROLL, TROLL_GONE);
             move(TROLL, LOC_NOWHERE);
             move(TROLL + NOBJECTS, LOC_NOWHERE);
             move(TROLL2, objects[TROLL].plac);
             move(TROLL2 + NOBJECTS, objects[TROLL].fixd);
             juggle(CHASM);
             move(TROLL, LOC_NOWHERE);
             move(TROLL + NOBJECTS, LOC_NOWHERE);
             move(TROLL2, objects[TROLL].plac);
             move(TROLL2 + NOBJECTS, objects[TROLL].fixd);
             juggle(CHASM);
-            game.prop[TROLL] = TROLL_GONE;
         } else if (obj != VASE ||
                    game.loc == objects[PILLOW].plac) {
             rspeak(OK_MAN);
         } else if (obj != VASE ||
                    game.loc == objects[PILLOW].plac) {
             rspeak(OK_MAN);
index e8e9c210d345b5c07f37fd86c7bfd154cf35135d..99097b2600bbd08970f8cbaa095c2431b6f5cbcf 100644 (file)
@@ -2971,9 +2971,6 @@ arbitrary_messages:  !!omap
     weight of the bear, which was still following you around.  You
     scrabble desperately for support, but as the bridge collapses you
     stumble back and fall into the chasm.
     weight of the bear, which was still following you around.  You
     scrabble desperately for support, but as the bridge collapses you
     stumble back and fall into the chasm.
-- TROLL_SCAMPERS: |-
-    The bear lumbers toward the troll, who lets out a startled shriek and
-    scurries away.  The bear soon gives up the pursuit and wanders back.
 - BEAR_HANDS: 'With what?  Your bare hands?  Against *HIS* bear hands??'
 - BEAR_CONFUSED: 'The bear is confused; he only wants to be your friend.'
 - ALREADY_DEAD: 'For crying out loud, the poor thing is already dead!'
 - BEAR_HANDS: 'With what?  Your bare hands?  Against *HIS* bear hands??'
 - BEAR_CONFUSED: 'The bear is confused; he only wants to be your friend.'
 - ALREADY_DEAD: 'For crying out loud, the poor thing is already dead!'
@@ -3506,9 +3503,16 @@ objects: !!omap
     - 'A burly troll stands by the bridge and insists you throw him a\ntreasure before you may cross.'
     - 'The troll steps out from beneath the bridge and blocks your way.'
     - '' # chased away
     - 'A burly troll stands by the bridge and insists you throw him a\ntreasure before you may cross.'
     - 'The troll steps out from beneath the bridge and blocks your way.'
     - '' # chased away
+    changes:
+    - ''
+    - ''
+    - |-
+        The bear lumbers toward the troll, who lets out a startled shriek and
+        scurries away.  The bear soon gives up the pursuit and wanders back.
     sounds:
     - 'The troll sounds quite adamant in his demand for a treasure.'
     - 'The troll sounds quite adamant in his demand for a treasure.'
     sounds:
     - 'The troll sounds quite adamant in his demand for a treasure.'
     - 'The troll sounds quite adamant in his demand for a treasure.'
+    - ''
 - TROLL2:
     words: ['troll']
     inventory: '*phony troll'
 - TROLL2:
     words: ['troll']
     inventory: '*phony troll'