diff options
author | Paul Janzen <pjanzen@cvs.openbsd.org> | 2000-09-26 04:42:57 +0000 |
---|---|---|
committer | Paul Janzen <pjanzen@cvs.openbsd.org> | 2000-09-26 04:42:57 +0000 |
commit | 081be079b82a2b9dcf1d7c705032e009184290b4 (patch) | |
tree | 7ec64cfd94c4f374f423a2d1639f6ed60b6ea28a /games/battlestar/com1.c | |
parent | 1b52f89e205c620c377b41287725ba817dcd34bb (diff) |
Improve handling of multiple commands on one line. Tidy fight parser.
Handle "all" in one place (almost). Add AUXVERB category and OBJ_PERSON/
OBJ_NONOBJ flags. Most was discussed with jsm@netbsd.org, and some is from
him.
Diffstat (limited to 'games/battlestar/com1.c')
-rw-r--r-- | games/battlestar/com1.c | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/games/battlestar/com1.c b/games/battlestar/com1.c index 1262e4c55bb..de06ef36d5a 100644 --- a/games/battlestar/com1.c +++ b/games/battlestar/com1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: com1.c,v 1.10 2000/09/24 21:55:22 pjanzen Exp $ */ +/* $OpenBSD: com1.c,v 1.11 2000/09/26 04:42:55 pjanzen Exp $ */ /* $NetBSD: com1.c,v 1.3 1995/03/21 15:06:51 cgd Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)com1.c 8.2 (Berkeley) 4/28/95"; #else -static char rcsid[] = "$OpenBSD: com1.c,v 1.10 2000/09/24 21:55:22 pjanzen Exp $"; +static char rcsid[] = "$OpenBSD: com1.c,v 1.11 2000/09/26 04:42:55 pjanzen Exp $"; #endif #endif /* not lint */ @@ -269,3 +269,24 @@ crash() ouch[hurt1], ouch[hurt2]); } } + +void +newlocation() +{ + news(); + if (beenthere[position] <= ROOMDESC) + beenthere[position]++; + if (notes[LAUNCHED]) + crash(); /* decrements fuel & crash */ + if (matchlight) { + puts("Your match splutters out."); + matchlight = 0; + } + if (!notes[CANTSEE] || TestBit(inven, LAMPON) || + TestBit(location[position].objects, LAMPON)) { + writedes(); + printobjs(); + } else + puts("It's too dark to see anything in here!"); + whichway(location[position]); +} |