Repair plover teleport and add a test for it.
This commit is contained in:
parent
2b89225ecd
commit
67bf87eda0
4 changed files with 14 additions and 11 deletions
9
main.c
9
main.c
|
@ -623,6 +623,7 @@ static bool playermove(FILE *cmdin, token_t verb, int motion)
|
||||||
/* else fall through */
|
/* else fall through */
|
||||||
} else if (game.prop[motion] != game.newloc / 100 - 3)
|
} else if (game.prop[motion] != game.newloc / 100 - 3)
|
||||||
break;
|
break;
|
||||||
|
L12:
|
||||||
do {
|
do {
|
||||||
if (TRAVEL[kk] < 0)BUG(25);
|
if (TRAVEL[kk] < 0)BUG(25);
|
||||||
++kk;
|
++kk;
|
||||||
|
@ -656,13 +657,7 @@ static bool playermove(FILE *cmdin, token_t verb, int motion)
|
||||||
* plover-passage to get it out. Having dropped it, go back and
|
* plover-passage to get it out. Having dropped it, go back and
|
||||||
* pretend he wasn't carrying it after all. */
|
* pretend he wasn't carrying it after all. */
|
||||||
DROP(EMRALD, game.loc);
|
DROP(EMRALD, game.loc);
|
||||||
do {
|
goto L12;
|
||||||
if (TRAVEL[kk] < 0)BUG(25);
|
|
||||||
++kk;
|
|
||||||
game.newloc = labs(TRAVEL[kk]) / 1000;
|
|
||||||
} while
|
|
||||||
(game.newloc == scratchloc);
|
|
||||||
continue; /* back to top of do/while loop */
|
|
||||||
case 3:
|
case 3:
|
||||||
/* Travel 303. Troll bridge. Must be done only as special
|
/* Travel 303. Troll bridge. Must be done only as special
|
||||||
* motion so that dwarves won't wander across and encounter
|
* motion so that dwarves won't wander across and encounter
|
||||||
|
|
|
@ -117,9 +117,10 @@ ways:
|
||||||
and the choice to refrain will make forward translation into future
|
and the choice to refrain will make forward translation into future
|
||||||
languages easier.
|
languages easier.
|
||||||
|
|
||||||
* There are a few gotos left that resist restructuring; all of these
|
* There are a few gotos left that resist restructuring; all but of these
|
||||||
are in the principal command interpreter function implementing its
|
are in the principal command interpreter function implementing its
|
||||||
state machine.
|
state machine. the remaining one is a truly mysterious artficat in
|
||||||
|
the player-movement code.
|
||||||
|
|
||||||
* Linked lists (for objects at a location) are implemented using an array
|
* Linked lists (for objects at a location) are implemented using an array
|
||||||
of link indices. This is a surviving FORTRANism that is quite unlike
|
of link indices. This is a surviving FORTRANism that is quite unlike
|
||||||
|
|
|
@ -1158,8 +1158,14 @@ OK
|
||||||
You are currently holding the following:
|
You are currently holding the following:
|
||||||
Egg-sized emerald
|
Egg-sized emerald
|
||||||
|
|
||||||
|
> plover
|
||||||
|
|
||||||
You scored 169 out of a possible 430, using 185 turns.
|
>>Foof!<<
|
||||||
|
|
||||||
|
It is now pitch dark. If you proceed you will likely fall into a pit.
|
||||||
|
|
||||||
|
|
||||||
|
You scored 169 out of a possible 430, using 186 turns.
|
||||||
|
|
||||||
You have achieved the rating: "Experienced Adventurer".
|
You have achieved the rating: "Experienced Adventurer".
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
## Test access to emerald
|
## Test access to emerald room and plover teleport
|
||||||
# Based on walkthrough at http://www.ecsoftwareconsulting.com/node/56
|
# Based on walkthrough at http://www.ecsoftwareconsulting.com/node/56
|
||||||
n
|
n
|
||||||
seed 1495951709
|
seed 1495951709
|
||||||
|
@ -188,3 +188,4 @@ drop lamp
|
||||||
e
|
e
|
||||||
take emerald
|
take emerald
|
||||||
inven
|
inven
|
||||||
|
plover
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue