projects
/
open-adventure.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Another use of state_change() and changes messages.
[open-adventure.git]
/
actions.c
diff --git
a/actions.c
b/actions.c
index b079bd352f863da9e3dab42a30da543b34efa5a9..7e1cc704f54925bc121d8077471aa60e0c09b25f 100644
(file)
--- a/
actions.c
+++ b/
actions.c
@@
-943,15
+943,15
@@
static int pour(token_t verb, token_t obj)
return GO_CLEAROBJ;
}
if (!AT(DOOR)) {
return GO_CLEAROBJ;
}
if (!AT(DOOR)) {
- if (obj != WATER) {
+ if (obj == WATER) {
+ /* cycle through the three plant states */
+ state_change(PLANT, MOD(game.prop[PLANT] + 1, 3));
+ game.prop[PLANT2] = game.prop[PLANT];
+ return GO_MOVE;
+ } else {
rspeak(SHAKING_LEAVES);
return GO_CLEAROBJ;
rspeak(SHAKING_LEAVES);
return GO_CLEAROBJ;
- }
- /* FIXME: Arithmetic on state numbers */
- pspeak(PLANT, look, game.prop[PLANT] + 3, true);
- game.prop[PLANT] = MOD(game.prop[PLANT] + 1, 3);
- game.prop[PLANT2] = game.prop[PLANT];
- return GO_MOVE;
+ }
} else {
state_change(DOOR, (obj == OIL) ?
DOOR_UNRUSTED :
} else {
state_change(DOOR, (obj == OIL) ?
DOOR_UNRUSTED :