Fixed logic, documented it in notes and tests
This commit is contained in:
parent
e91742e1b9
commit
29672a6447
4 changed files with 29 additions and 4 deletions
|
@ -528,7 +528,9 @@ static int extinguish(token_t verb, int obj)
|
|||
obj = LAMP;
|
||||
if (HERE(URN) && game.prop[URN] == URN_LIT)
|
||||
obj = URN;
|
||||
if (obj == INTRANSITIVE)
|
||||
if (obj == INTRANSITIVE ||
|
||||
HERE(LAMP) && game.prop[LAMP] == LAMP_BRIGHT &&
|
||||
HERE(URN) && game.prop[URN] == URN_LIT)
|
||||
return GO_UNKNOWN;
|
||||
}
|
||||
|
||||
|
@ -739,7 +741,9 @@ static int light(token_t verb, token_t obj)
|
|||
obj = LAMP;
|
||||
if (HERE(URN) && game.prop[URN] == URN_DARK)
|
||||
obj = URN;
|
||||
if (obj == INTRANSITIVE || obj == 0 || obj > NOBJECTS)
|
||||
if (obj == INTRANSITIVE ||
|
||||
HERE(LAMP) && game.prop[LAMP] == LAMP_DARK && game.limit >= 0 &&
|
||||
HERE(URN) && game.prop[URN] == URN_DARK)
|
||||
return GO_UNKNOWN;
|
||||
}
|
||||
|
||||
|
|
|
@ -93,6 +93,7 @@ what you are running when you do "make check".
|
|||
In the process we found and fixed a few minor bugs. Most notably, reading
|
||||
the relocated Witt's End sign in the endgame didn't work. Behavior when
|
||||
saying the giant's magic words outside his room wasn't quite right either.
|
||||
Attempt to extinguish dark urn would have cause it do lose oil.
|
||||
|
||||
The move to modern C entailed some structural changes. The most
|
||||
important was the refactoring of over 350 gotos into if/loop/break
|
||||
|
|
|
@ -1989,6 +1989,10 @@ There's no way to get the oil out of the urn.
|
|||
|
||||
Don't be ridiculous!
|
||||
|
||||
> light
|
||||
|
||||
Light what?
|
||||
|
||||
> light urn
|
||||
|
||||
The urn is now lit.
|
||||
|
@ -2015,6 +2019,10 @@ A small oil flame extrudes from an urn embedded in the rock.
|
|||
|
||||
The urn is now dark.
|
||||
|
||||
> extinguish
|
||||
|
||||
Extin what?
|
||||
|
||||
> look
|
||||
|
||||
Sorry, but I am not allowed to give more detail. I will repeat the
|
||||
|
@ -2025,10 +2033,14 @@ down, but a small ledge can be seen to the west across the chasm.
|
|||
|
||||
A small urn full of oil is embedded in the rock.
|
||||
|
||||
> light
|
||||
> light urn
|
||||
|
||||
The urn is now lit.
|
||||
|
||||
> light
|
||||
|
||||
Your lamp is now on.
|
||||
|
||||
> look
|
||||
|
||||
Sorry, but I am not allowed to give more detail. I will repeat the
|
||||
|
@ -2043,6 +2055,10 @@ A small oil flame extrudes from an urn embedded in the rock.
|
|||
|
||||
The urn is now dark.
|
||||
|
||||
> extinguish
|
||||
|
||||
Your lamp is now off.
|
||||
|
||||
> look
|
||||
|
||||
The forest thins out here to reveal a steep cliff. There is no way
|
||||
|
@ -2056,7 +2072,7 @@ If you mean to use the persian rug, it does not appear inclined to
|
|||
cooperate.
|
||||
|
||||
|
||||
You scored 267 out of a possible 430, using 345 turns.
|
||||
You scored 267 out of a possible 430, using 349 turns.
|
||||
|
||||
You have reached "Junior Master" status.
|
||||
|
||||
|
|
|
@ -338,14 +338,18 @@ light urn
|
|||
pour bottle
|
||||
fill bottle
|
||||
drink oil
|
||||
light
|
||||
light urn
|
||||
fill urn
|
||||
read urn
|
||||
look
|
||||
extinguish
|
||||
extinguish
|
||||
look
|
||||
light urn
|
||||
light
|
||||
look
|
||||
extinguish urn
|
||||
extinguish
|
||||
look
|
||||
fly
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue