* fixed), move rug there (not fixed), and move him there,
* too. Then do a null motion to get new description. */
rspeak(BARE_HANDS_QUERY);
- if (!silent_yes())
- {
- speak(arbitrary_messages[NASTY_DRAGON]);
- return GO_MOVE;
- }
+ if (!silent_yes()) {
+ speak(arbitrary_messages[NASTY_DRAGON]);
+ return GO_MOVE;
+ }
state_change(DRAGON, DRAGON_DEAD);
game.prop[RUG] = RUG_FLOOR;
/* Hardcoding LOC_SECRET5 as the dragon's death location is ugly.
game.prop[BEAR] = CONTENTED_BEAR;
switch (game.prop[BEAR]) {
+ // LCOV_EXCL_START
case BEAR_DEAD:
- // LCOV_EXCL_START
/* Can't be reached as long as the only way for the bear to die
* is from a bridge collapse. Leave in in case this changes, but
* exclude from coverage testing. */
} else
rspeak(OK_MAN);
- game.prop[BIRD] = FOREST(game.loc) ? BIRD_FOREST_UNCAGED : BIRD_UNCAGED;
+ game.prop[BIRD] = FOREST(game.loc) ? BIRD_FOREST_UNCAGED : BIRD_UNCAGED;
drop(obj, game.loc);
return GO_CLEAROBJ;
}
case OYSTER:
if (verb == LOCK)
rspeak(HUH_MAN);
- else if (TOTING(OYSTER))
- rspeak(DROP_OYSTER);
+ else if (TOTING(OYSTER))
+ rspeak(DROP_OYSTER);
else if (!TOTING(TRIDENT))
rspeak(OYSTER_OPENER);
- else
- rspeak(OYSTER_OPENS);
+ else
+ rspeak(OYSTER_OPENS);
break;
case DOOR:
rspeak((game.prop[DOOR] == DOOR_UNRUSTED) ? OK_MAN : RUSTY_DOOR);
return listen();
case PART:
return reservoir();
- default:
+ default: // LCOV_EXCL_LINE
BUG(INTRANSITIVE_ACTION_VERB_EXCEEDS_GOTO_LIST); // LCOV_EXCL_LINE
}
}
}
case PART:
return reservoir();
- default:
+ default: // LCOV_EXCL_LINE
BUG(TRANSITIVE_ACTION_VERB_EXCEEDS_GOTO_LIST); // LCOV_EXCL_LINE
}
case unknown:
/* Unknown verb, couldn't deduce object - might need hint */
sspeak(WHAT_DO, command->raw1);
return GO_CHECKHINT;
- default:
+ default: // LCOV_EXCL_LINE
BUG(SPEECHPART_NOT_TRANSITIVE_OR_INTRANSITIVE_OR_UNKNOWN); // LCOV_EXCL_LINE
}
}
break;
game.hintlc[hint] = 0;
return;
- default:
+ default: // LCOV_EXCL_LINE
BUG(HINT_NUMBER_EXCEEDS_GOTO_LIST); // LCOV_EXCL_LINE
- break;
}
/* Fall through to hint display */
croak();
return;
}
- default:
+ default: // LCOV_EXCL_LINE
BUG(SPECIAL_TRAVEL_500_GT_L_GT_300_EXCEEDS_GOTO_LIST); // LCOV_EXCL_LINE
}
}
}
if (command.id1 == ENTER && command.id2 != WORD_NOT_FOUND && command.id2 != WORD_EMPTY) {
command.id1 = command.id2;
- command.type1 = command.type2;
- strncpy(command.raw1, command.raw2, LINESIZE - 1);
+ command.type1 = command.type2;
+ strncpy(command.raw1, command.raw2, LINESIZE - 1);
command.id2 = WORD_EMPTY;
- command.type2 = NO_WORD_TYPE;
- strncpy(command.raw2, "", LINESIZE - 1);
+ command.type2 = NO_WORD_TYPE;
+ strncpy(command.raw2, "", LINESIZE - 1);
} else {
if (!((command.id1 != WATER && command.id1 != OIL) || (command.id2 != PLANT && command.id2 != DOOR))) {
- if (AT(command.id2))
- {
- command.id2 = POUR;
- command.type2 = ACTION;
- strncpy(command.raw2, "POUR", LINESIZE - 1);
+ if (AT(command.id2)) {
+ command.id2 = POUR;
+ command.type2 = ACTION;
+ strncpy(command.raw2, "POUR", LINESIZE - 1);
command.wd2 = token_to_packed("POUR");
- }
+ }
}
- if (command.id1 == CAGE && command.id2 == BIRD && HERE(CAGE) && HERE(BIRD))
- {
- command.id1 = CARRY;
- command.type1 = ACTION;
- strncpy(command.raw2, "CATCH", LINESIZE - 1);
+ if (command.id1 == CAGE && command.id2 == BIRD && HERE(CAGE) && HERE(BIRD)) {
+ command.id1 = CARRY;
+ command.type1 = ACTION;
+ strncpy(command.raw2, "CATCH", LINESIZE - 1);
command.wd1 = token_to_packed("CATCH");
- }
+ }
}
Lookup:
if (strncasecmp(command.raw1, "west", sizeof("west")) == 0) {
rspeak(GO_UNNEEDED);
}
packed_to_token(command.wd1, word1);
- long defn;
- enum wordtype type;
- get_vocab_metadata(word1, &defn, &type);
+ long defn;
+ enum wordtype type;
+ get_vocab_metadata(word1, &defn, &type);
if (command.id1 == WORD_NOT_FOUND) {
if (fallback_handler(command))
continue;
case SPECIAL:
speak(specials[command.id1].message);
goto Lclearobj;
- default:
+ default: // LCOV_EXCL_LINE
BUG(VOCABULARY_TYPE_N_OVER_1000_NOT_BETWEEN_0_AND_3); // LCOV_EXCL_LINE
}
goto Lookup;
case GO_WORD2:
/* Get second word for analysis. */
- command.id1 = command.id2;
- command.type1 = command.type2;
- strncpy(command.raw1, command.raw2, LINESIZE - 1);
- command.wd1 = command.wd2;
- command.id2 = WORD_EMPTY;
- command.type2 = NO_WORD_TYPE;
- command.raw2[0] = '\0';
+ command.id1 = command.id2;
+ command.type1 = command.type2;
+ strncpy(command.raw1, command.raw2, LINESIZE - 1);
+ command.wd1 = command.wd2;
+ command.id2 = WORD_EMPTY;
+ command.type2 = NO_WORD_TYPE;
+ command.raw2[0] = '\0';
wordclear(&command.wd2);
goto Lookup;
case GO_UNKNOWN:
/* Oh dear, he's disturbed the dwarves. */
rspeak(DWARVES_AWAKEN);
terminate(endgame);
- default:
+ default: // LCOV_EXCL_LINE
BUG(ACTION_RETURNED_PHASE_CODE_BEYOND_END_OF_SWITCH); // LCOV_EXCL_LINE
}
}