#define WRITE_MODE "wb" // b is not needed for POSIX but harmless
/* Special object-state values - integers > 0 are object-specific */
-#define STATE_NOTFOUND -1 // 'Not found" state of treasures */
+#define STATE_NOTFOUND -1 // 'Not found" state of treasures
#define STATE_FOUND 0 // After discovered, before messed with
#define STATE_IN_CAVITY 1 // State value common to all gemstones
/* Map a state property value to a negative range, where the object cannot be
* picked up but the value can be recovered later. Avoid colliding with -1,
- * which has its own meaning. */
+ * which has its own meaning as STATE_NOTFOUND. */
#define STASHED(obj) (-1 - game.prop[obj])
#define PROMPT "> "
/* Check that properties of objects aren't beyond expected */
for (obj_t obj = 0; obj <= NOBJECTS; obj++) {
- if (valgame.prop[obj] < STATE_NOTFOUND || valgame.prop[obj] > 1) {
+ /* Magic number -2 allows a STASHED version of state 1 */
+ if (valgame.prop[obj] < -2 || valgame.prop[obj] > 1) {
switch (obj) {
case RUG:
case DRAGON:
> resume
Can't open file y, try again.
-A dark fog creeps in to surround you. From somewhere in the fog you
-hear a stern voice. "This Adventure has been tampered with! You have
-been dabbling in magic, knowing not the havoc you might cause thereby.
-Leave at once, before you do irrevocable harm!" The fog thickens,
-until at last you can see nothing at all. Your vision then clears,
-and you find yourself back in The Real World.
+You're at sw end.
+
+The grate is locked.
+
+> blast
+
+There is a loud explosion, and a twenty-foot hole appears in the far
+wall, burying the dwarves in the rubble. You march through the hole
+and find yourself in the main office, where a cheering band of
+friendly elves carry the conquering adventurer off into the sunset.
+
+You scored 423 out of a possible 430, using 468 turns.
+
+Your score puts you in Master Adventurer Class A.
+
+To achieve the next higher rating, you need 4 more points.