Another use of state_change().

This commit is contained in:
Eric S. Raymond 2017-07-04 08:16:10 -04:00
parent e91b8c2a06
commit 248fc90e3d
2 changed files with 8 additions and 5 deletions

View file

@ -482,13 +482,12 @@ static int discard(token_t verb, token_t obj, bool just_do_it)
DESTROY(BIRD); DESTROY(BIRD);
return GO_CLEAROBJ; return GO_CLEAROBJ;
} else if (obj == BEAR && AT(TROLL)) { } else if (obj == BEAR && AT(TROLL)) {
rspeak(TROLL_SCAMPERS); state_change(TROLL, TROLL_GONE);
move(TROLL, LOC_NOWHERE); move(TROLL, LOC_NOWHERE);
move(TROLL + NOBJECTS, LOC_NOWHERE); move(TROLL + NOBJECTS, LOC_NOWHERE);
move(TROLL2, objects[TROLL].plac); move(TROLL2, objects[TROLL].plac);
move(TROLL2 + NOBJECTS, objects[TROLL].fixd); move(TROLL2 + NOBJECTS, objects[TROLL].fixd);
juggle(CHASM); juggle(CHASM);
game.prop[TROLL] = TROLL_GONE;
} else if (obj != VASE || } else if (obj != VASE ||
game.loc == objects[PILLOW].plac) { game.loc == objects[PILLOW].plac) {
rspeak(OK_MAN); rspeak(OK_MAN);

View file

@ -2971,9 +2971,6 @@ arbitrary_messages: !!omap
weight of the bear, which was still following you around. You weight of the bear, which was still following you around. You
scrabble desperately for support, but as the bridge collapses you scrabble desperately for support, but as the bridge collapses you
stumble back and fall into the chasm. 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_HANDS: 'With what? Your bare hands? Against *HIS* bear hands??'
- BEAR_CONFUSED: 'The bear is confused; he only wants to be your friend.' - 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!' - 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.' - '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.' - 'The troll steps out from beneath the bridge and blocks your way.'
- '' # chased away - '' # 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: sounds:
- 'The troll sounds quite adamant in his demand for a treasure.' - 'The troll sounds quite adamant in his demand for a treasure.'
- 'The troll sounds quite adamant in his demand for a treasure.' - 'The troll sounds quite adamant in his demand for a treasure.'
- ''
- TROLL2: - TROLL2:
words: ['troll'] words: ['troll']
inventory: '*phony troll' inventory: '*phony troll'