From: Eric S. Raymond Date: Tue, 4 Jul 2017 12:16:10 +0000 (-0400) Subject: Another use of state_change(). X-Git-Tag: takebird~53 X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=commitdiff_plain;h=248fc90e3d2cb0c3e2bcc6cace7d11d4ff763db0 Another use of state_change(). --- diff --git a/actions.c b/actions.c index 7e1cc70..de888d4 100644 --- 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)) { - 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); - game.prop[TROLL] = TROLL_GONE; } else if (obj != VASE || game.loc == objects[PILLOW].plac) { rspeak(OK_MAN); diff --git a/adventure.yaml b/adventure.yaml index e8e9c21..99097b2 100644 --- a/adventure.yaml +++ b/adventure.yaml @@ -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. -- 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!' @@ -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 + 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.' + - '' - TROLL2: words: ['troll'] inventory: '*phony troll'