RUBY, RUG, SAPPH, SAY, SIGN, SNAKE,
STEPS, STREAM, THROW, TRIDENT, TROLL, TROLL2,
URN, VASE, VEND, VOLCANO, WATER;
RUBY, RUG, SAPPH, SAY, SIGN, SNAKE,
STEPS, STREAM, THROW, TRIDENT, TROLL, TROLL2,
URN, VASE, VEND, VOLCANO, WATER;
-/* Check if this loc is eligible for any hints. If been here
- * long enough, branch to help section (on later page). Hints
- * all come back here eventually to finish the loop. Ignore
- * "HINTS" < 4 (special stuff, see database notes).
- */
+/* Check if this loc is eligible for any hints. If been here long
+ * enough, display. Ignore "HINTS" < 4 (special stuff, see database
+ * notes). */
- if (!YES(arbitrary_messages[HINTS[hint][3]], arbitrary_messages[NO_MESSAGE], arbitrary_messages[OK_MAN]))
+ if (!YES(hints[hint-1].question, arbitrary_messages[NO_MESSAGE], arbitrary_messages[OK_MAN]))
- game.hinted[hint] = YES(arbitrary_messages[WANT_HINT], arbitrary_messages[HINTS[hint][4]], arbitrary_messages[OK_MAN]);
+ game.hinted[hint] = YES(arbitrary_messages[WANT_HINT], hints[hint-1].hint, arbitrary_messages[OK_MAN]);
- * lamp give out. When it gets close, we come here to warn
- * him. First following ar, if the lamp and fresh batteries are
+ * lamp give out. When it gets close, we come here to warn him.
+ * First following arm checks if the lamp and fresh batteries are
- * Second is for other cases of lamp dying. 12400 is when it
- * goes out. Even then, he can explore outside for a while
- * if desired. */
+ * Second is for other cases of lamp dying. Eve after it goes
+ * out, he can explore outside for a while if desired. */
if (game.limit <= WARNTIME && HERE(BATTERY) && game.prop[BATTERY] == 0 && HERE(LAMP)) {
RSPEAK(REPLACE_BATTERIES);
game.prop[BATTERY] = 1;
if (game.limit <= WARNTIME && HERE(BATTERY) && game.prop[BATTERY] == 0 && HERE(LAMP)) {
RSPEAK(REPLACE_BATTERIES);
game.prop[BATTERY] = 1;
/* Can't leave cave once it's closing (except by main office). */
if (OUTSID(game.newloc) && game.newloc != 0 && game.closng) {
/* Can't leave cave once it's closing (except by main office). */
if (OUTSID(game.newloc) && game.newloc != 0 && game.closng) {
- if (!GETIN(cmdin, &WD1, &WD1X, &WD2, &WD2X))
+ if (!GETIN(cmdin, &command.wd1, &command.wd1x, &command.wd2, &command.wd2x))
- if (game.turns == game.thresh) {
- speak(turn_threshold_messages[game.trndex]);
- game.trnluz = game.trnluz + TRNVAL[game.trndex] / 100000;
- ++game.trndex;
- game.thresh = -1;
- if (game.trndex <= TRNVLS)
- game.thresh = MOD(TRNVAL[game.trndex], 100000) + 1;
- }
- if (verb == SAY && WD2 > 0)
- verb = 0;
- if (verb == SAY) {
- part = transitive;
+
+ /* If a turn threshold has been met, apply penalties and tell
+ * the player about it. */
+ for (int i = 0; i < turn_threshold_count; ++i)
+ {
+ if (game.turns == turn_thresholds[i].threshold + 1)
+ {
+ game.trnluz += turn_thresholds[i].point_loss;
+ speak(turn_thresholds[i].message);
+ }
+ }
+
+ if (command.verb == SAY && command.wd2 > 0)
+ command.verb = 0;
+ if (command.verb == SAY) {
+ command.part = transitive;
- if (V1 == ENTER && WD2 > 0) {
- WD1 = WD2;
- WD1X = WD2X;
- wordclear(&WD2);
+ if (V1 == ENTER && command.wd2 > 0) {
+ command.wd1 = command.wd2;
+ command.wd1x = command.wd2x;
+ wordclear(&command.wd2);
} else {
/* FIXME: Magic numbers */
if (!((V1 != 1000 + WATER && V1 != 1000 + OIL) ||
(V2 != 1000 + PLANT && V2 != 1000 + DOOR))) {
if (AT(V2 - 1000))
} else {
/* FIXME: Magic numbers */
if (!((V1 != 1000 + WATER && V1 != 1000 + OIL) ||
(V2 != 1000 + PLANT && V2 != 1000 + DOOR))) {
if (AT(V2 - 1000))
if (defn == -1) {
/* Gee, I don't understand. */
if (fallback_handler(rawbuf))
continue;
if (defn == -1) {
/* Gee, I don't understand. */
if (fallback_handler(rawbuf))
continue;