From 21adfe080742ef004d4570cbb84814faca608850 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 9 Jun 2017 02:12:59 -0400 Subject: [PATCH] More vocabulary handlers. --- actions2.c | 9 +++++++++ advent.h | 1 + 2 files changed, 10 insertions(+) diff --git a/actions2.c b/actions2.c index 5b0bd86..72bd0b0 100644 --- a/actions2.c +++ b/actions2.c @@ -7,6 +7,15 @@ int carry(long obj) { + if (obj == INTRANSITIVE) { + /* Carry, no object given yet. OK if only one object present. */ + if(game.atloc[game.loc] == 0 || + game.link[game.atloc[game.loc]] != 0 || + ATDWRF(game.loc) > 0) + return(8000); + obj=game.atloc[game.loc]; + } + if (TOTING(obj)) return(2011); SPK=25; if (obj == PLANT && game.prop[PLANT] <= 0)SPK=115; diff --git a/advent.h b/advent.h index e33d66a..90b25c6 100644 --- a/advent.h +++ b/advent.h @@ -11,6 +11,7 @@ #define MAXTRS 79 #define MAXPARMS 25 #define INVLIMIT 7 +#define INTRANSITIVE -1 /* illegal object number */ typedef struct lcg_state { -- 2.31.1