More magic-number elimination.
This commit is contained in:
parent
5c2b76f762
commit
4f08537e2d
3 changed files with 8 additions and 11 deletions
|
@ -888,11 +888,7 @@ static int pour(token_t verb, token_t obj)
|
|||
game.prop[PLANT2] = game.prop[PLANT];
|
||||
return GO_MOVE;
|
||||
} else {
|
||||
game.prop[DOOR] = 0;
|
||||
if (obj == OIL)
|
||||
game.prop[DOOR] = 1;
|
||||
spk = RUSTED_HINGES + game.prop[DOOR];
|
||||
rspeak(spk);
|
||||
state_change(DOOR, (obj == OIL) ? DOOR_UNRUSTED: DOOR_RUSTED);
|
||||
return GO_CLEAROBJ;
|
||||
}
|
||||
}
|
||||
|
@ -1086,7 +1082,7 @@ static int wave(token_t verb, token_t obj)
|
|||
rspeak(spk);
|
||||
return GO_CLEAROBJ;
|
||||
}
|
||||
/* FIXME: Arithemetic on proprty values */
|
||||
/* FIXME: Arithemetic on property values */
|
||||
if (HERE(BIRD))
|
||||
spk = FREE_FLY + MOD(game.prop[BIRD], 2);
|
||||
if (spk == FREE_FLY && game.loc == game.place[STEPS] && game.prop[JADE] < 0) {
|
||||
|
|
|
@ -2865,8 +2865,6 @@ arbitrary_messages: !!omap
|
|||
- RIDICULOUS_ATTEMPT: 'Don''t be ridiculous!'
|
||||
- RUSTY_DOOR: 'The door is extremely rusty and refuses to open.'
|
||||
- SHAKING_LEAVES: 'The plant indignantly shakes the oil off its leaves and asks, "Water?"'
|
||||
- RUSTED_HINGES: 'The hinges are quite thoroughly rusted now and won''t budge.'
|
||||
- OILED_NINGES: 'The oil has freed up the hinges so that the door will now move,\nalthough it requires some effort.'
|
||||
- DEEP_ROOTS: 'The plant has exceptionally deep roots and cannot be pulled free.'
|
||||
- KNIVES_VANISH: 'The dwarves'' knives vanish as they strike the walls of the cave.'
|
||||
- MUST_DROP: 'Something you''re carrying won''t fit through the tunnel with you.\nYou''d best take inventory and drop something.'
|
||||
|
@ -3131,8 +3129,11 @@ objects: !!omap
|
|||
locations: LOC_IMMENSE
|
||||
immovable: true
|
||||
descriptions:
|
||||
- 'The way north is barred by a massive, rusty, iron door.'
|
||||
- 'The way north leads through a massive, rusty, iron door.'
|
||||
- [DOOR_RUSTED, 'The way north is barred by a massive, rusty, iron door.']
|
||||
- [DOOR_UNRUSTED, 'The way north leads through a massive, rusty, iron door.']
|
||||
changes:
|
||||
- 'The hinges are quite thoroughly rusted now and won''t budge.'
|
||||
- 'The oil has freed up the hinges so that the door will now move,\nalthough it requires some effort.'
|
||||
- PILLOW:
|
||||
words: ['pillo', 'velve']
|
||||
inventory: 'Velvet pillow'
|
||||
|
|
2
main.c
2
main.c
|
@ -692,7 +692,7 @@ static bool playermove( int motion)
|
|||
* stuff for bear. */
|
||||
if (game.prop[TROLL] == TROLL_PAIDONCE) {
|
||||
pspeak(TROLL, look, TROLL_PAIDONCE);
|
||||
game.prop[TROLL] = 0;
|
||||
game.prop[TROLL] = TROLL_UNPAID;
|
||||
move(TROLL2, 0);
|
||||
move(TROLL2 + NOBJECTS, 0);
|
||||
move(TROLL, objects[TROLL].plac);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue