{
vocab_t verb = command->verb;
vocab_t obj = command->obj;
- int spk = ACTSPK[verb];
+ int spk = actspk[verb];
if (obj == 0 || obj == INTRANSITIVE) {
if (ATDWRF(game.loc) > 0)
obj = DWARF;
static int vbreak(token_t verb, token_t obj)
/* Break. Only works for mirror in repository and, of course, the vase. */
{
- int spk = ACTSPK[verb];
+ int spk = actspk[verb];
if (obj == MIRROR)spk = TOO_FAR;
if (obj == VASE && game.prop[VASE] == 0) {
if (TOTING(VASE))DROP(VASE, game.loc);
* bird (might attack snake or dragon) and cage (might contain bird) and vase.
* Drop coins at vending machine for extra batteries. */
{
- int spk = ACTSPK[verb];
+ int spk = actspk[verb];
if (!just_do_it) {
if (TOTING(ROD2) && obj == ROD && !TOTING(ROD))obj = ROD2;
if (!TOTING(obj)) {
/* Drink. If no object, assume water and look for it here. If water is in
* the bottle, drink that, else must be at a water loc, so drink stream. */
{
- int spk = ACTSPK[verb];
+ int spk = actspk[verb];
if (obj == 0 && LIQLOC(game.loc) != WATER && (LIQUID() != WATER || !HERE(BOTTLE)))
return GO_UNKNOWN;
if (obj != BLOOD) {
/* Eat. Intransitive: assume food if present, else ask what. Transitive: food
* ok, some things lose appetite, rest are ridiculous. */
{
- int spk = ACTSPK[verb];
+ int spk = actspk[verb];
if (obj == INTRANSITIVE) {
if (!HERE(FOOD))
return GO_UNKNOWN;
static int extinguish(token_t verb, int obj)
/* Extinguish. Lamp, urn, dragon/volcano (nice try). */
{
- int spk = ACTSPK[verb];
+ int spk = actspk[verb];
if (obj == INTRANSITIVE) {
if (HERE(LAMP) && game.prop[LAMP] == LAMP_BRIGHT)
obj = LAMP;
/* Feed. If bird, no seed. Snake, dragon, troll: quip. If dwarf, make him
* mad. Bear, special. */
{
- int spk = ACTSPK[verb];
+ int spk = actspk[verb];
if (obj == BIRD) {
rspeak(BIRD_PINING);
return GO_CLEAROBJ;
* is nasty.) */
{
int k;
- int spk = ACTSPK[verb];
+ int spk = actspk[verb];
if (obj == VASE) {
spk = ARENT_CARRYING;
if (LIQLOC(game.loc) == 0)spk = FILL_INVALID;
static int find(token_t verb, token_t obj)
/* Find. Might be carrying it, or it might be here. Else give caveat. */
{
- int spk = ACTSPK[verb];
+ int spk = actspk[verb];
if (AT(obj) ||
(LIQUID() == obj && AT(BOTTLE)) ||
obj == LIQLOC(game.loc) ||
static int fly(token_t verb, token_t obj)
/* Fly. Snide remarks unless hovering rug is here. */
{
- int spk = ACTSPK[verb];
+ int spk = actspk[verb];
if (obj == INTRANSITIVE) {
if (game.prop[RUG] != 2)spk = RUG_NOTHING2;
if (!HERE(RUG))spk = FLAP_ARMS;
static int light(token_t verb, token_t obj)
/* Light. Applicable only to lamp and urn. */
{
- int spk = ACTSPK[verb];
+ int spk = actspk[verb];
if (obj == INTRANSITIVE) {
if (HERE(LAMP) && game.prop[LAMP] == LAMP_DARK && game.limit >= 0)
obj = LAMP;
static int lock(token_t verb, token_t obj)
/* Lock, unlock, no object given. Assume various things if present. */
{
- int spk = ACTSPK[verb];
+ int spk = actspk[verb];
if (obj == INTRANSITIVE) {
spk = NOTHING_LOCKED;
if (HERE(CLAM))obj = CLAM;
/* Pour. If no object, or object is bottle, assume contents of bottle.
* special tests for pouring water or oil on plant or rusty door. */
{
- int spk = ACTSPK[verb];
+ int spk = actspk[verb];
if (obj == BOTTLE || obj == 0)obj = LIQUID();
if (obj == 0) return GO_UNKNOWN;
if (!TOTING(obj)) {
} else if (command.obj == OYSTER && !game.clshnt && game.closed) {
game.clshnt = YES(arbitrary_messages[CLUE_QUERY], arbitrary_messages[WAYOUT_CLUE], arbitrary_messages[OK_MAN]);
} else if (object_descriptions[command.obj].texts[0] == NULL || game.prop[command.obj] < 0) {
- rspeak(ACTSPK[command.verb]);
+ rspeak(actspk[command.verb]);
} else
pspeak(command.obj, study, game.prop[command.obj]);
return GO_CLEAROBJ;
static int rub(token_t verb, token_t obj)
/* Rub. Yields various snide remarks except for lit urn. */
{
- int spk = ACTSPK[verb];
+ int spk = actspk[verb];
if (obj != LAMP)
spk = PECULIAR_NOTHING;
if (obj == URN && game.prop[URN] == 2) {
* (Only way to do so!) Axe also special for dragon, bear, and
* troll. Treasures special for troll. */
{
- int spk = ACTSPK[command->verb];
+ int spk = actspk[command->verb];
if (TOTING(ROD2) && command->obj == ROD && !TOTING(ROD))command->obj = ROD2;
if (!TOTING(command->obj)) {
rspeak(spk);
/* Wake. Only use is to disturb the dwarves. */
{
if (obj != DWARF || !game.closed) {
- rspeak(ACTSPK[verb]);
+ rspeak(actspk[verb]);
return GO_CLEAROBJ;
} else {
rspeak(PROD_DWARF);
static int wave(token_t verb, token_t obj)
/* Wave. No effect unless waving rod at fissure or at bird. */
{
- int spk = ACTSPK[verb];
+ int spk = actspk[verb];
if ((!TOTING(obj)) && (obj != ROD || !TOTING(ROD2)))spk = ARENT_CARRYING;
if (obj != ROD ||
!TOTING(obj) ||
* unless verb is "say", which snarfs arbitrary second word.
*/
{
- token_t spk = ACTSPK[command->verb];
+ token_t spk = actspk[command->verb];
if (command->part == unknown) {
/* Analyse an object word. See if the thing is here, whether
* 12600 words of message text (LINES, LINSIZ).
* 885 travel options (TRAVEL, TRVSIZ).
* 330 vocabulary words (KTAB, ATAB, TABSIZ).
- * 35 "action" verbs (ACTSPK, VRBSIZ).
* There are also limits which cannot be exceeded due to the structure of
* the database. (E.G., The vocabulary uses n/1000 to determine word type,
* so there can't be more than 1000 words.) These upper limits are:
* or "attack"). Else, if M=3, the word is a special case verb (such as
* "dig") and N % 1000 is an index into section 6. Objects from 50 to
* (currently, anyway) 79 are considered treasures (for pirate, closeout).
- * Section 8: Action defaults. Each line contains an "action-verb" number and
- * the index (in section 6) of the default message for the verb.
* Section 0: End of database.
*
* Other sections are obsolete and ignored */
long TRAVEL[TRVSIZ + 1];
long KTAB[TABSIZ + 1];
long ATAB[TABSIZ + 1];
-long ACTSPK[VRBSIZ + 1];
static long GETTXT(long SKIP, long ONEWRD, long UPPER)
{
}
}
-/* Read default message numbers for action verbs, store in ACTSPK. */
+/* Read default message numbers for action verbs. */
static void read_action_verb_message_nr(FILE* database)
{
long verb;
while ((verb = GETNUM(database)) != -1) {
- ACTSPK[verb] = GETNUM(NULL);
+ /* now declared in YAML */
}
}
write_1d(header_file, TRAVEL, TRVSIZ + 1, "TRAVEL");
write_1d(header_file, KTAB, TABSIZ + 1, "KTAB");
write_1d(header_file, ATAB, TABSIZ + 1, "ATAB");
- write_1d(header_file, ACTSPK, VRBSIZ + 1, "ACTSPK");
fprintf(header_file, "#undef LOCATION\n");
fprintf(header_file, "#undef INITIALIZE\n");