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;
- /* Logical variables:
- *
- * game.closed says whether we're all the way closed
- * game.closng says whether it's closing time yet
- * game.clshnt says whether he's read the clue in the endgame
- * game.lmwarn says whether he's been warned about lamp going dim
- * game.novice says whether he asked for instructions at start-up
- * game.panic says whether he's found out he's trapped in the cave
- * game.wzdark says whether the loc he's leaving was dark */
-
if (!rfp) {
game.novice = YES(arbitrary_messages[WELCOME_YOU], arbitrary_messages[CAVE_NEARBY], arbitrary_messages[NO_MESSAGE]);
if (!rfp) {
game.novice = YES(arbitrary_messages[WELCOME_YOU], arbitrary_messages[CAVE_NEARBY], arbitrary_messages[NO_MESSAGE]);
-/* 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). */
/* The pirate's spotted him. He leaves him alone once we've
* found chest. K counts if a treasure is here. If not, and
* tally=1 for an unseen chest, let the pirate be spotted. Note
/* The pirate's spotted him. He leaves him alone once we've
* found chest. K counts if a treasure is here. If not, and
* tally=1 for an unseen chest, let the pirate be spotted. Note
* it to the troll, but in that case he's seen the chest
* (game.prop=0). */
if (game.loc == game.chloc || game.prop[CHEST] >= 0)
* it to the troll, but in that case he's seen the chest
* (game.prop=0). */
if (game.loc == game.chloc || game.prop[CHEST] >= 0)
- * 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;
- WD2 = 0;
+ if (V1 == ENTER && command.wd2 > 0) {
+ command.wd1 = command.wd2;
+ command.wd1x = command.wd2x;
+ wordclear(&command.wd2);
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;