summaryrefslogtreecommitdiffstats
path: root/games/larn
diff options
context:
space:
mode:
authorrgrimes <rgrimes@FreeBSD.org>1995-05-30 03:37:36 +0000
committerrgrimes <rgrimes@FreeBSD.org>1995-05-30 03:37:36 +0000
commit30ef9631c5eac7f8254bd3d7ad274d34d9f518b8 (patch)
tree4d8ac7e75ac179a918a76def244de6e3f3314e76 /games/larn
parent188803394908f222ab3ed8ec32331eb6dd00fd2d (diff)
downloadFreeBSD-src-30ef9631c5eac7f8254bd3d7ad274d34d9f518b8.zip
FreeBSD-src-30ef9631c5eac7f8254bd3d7ad274d34d9f518b8.tar.gz
Remove trailing whitespace.
Diffstat (limited to 'games/larn')
-rw-r--r--games/larn/create.c8
-rw-r--r--games/larn/data.c6
-rw-r--r--games/larn/diag.c2
-rw-r--r--games/larn/display.c12
-rw-r--r--games/larn/global.c12
-rw-r--r--games/larn/header.h80
-rw-r--r--games/larn/help.c2
-rw-r--r--games/larn/io.c30
-rw-r--r--games/larn/main.c24
-rw-r--r--games/larn/monster.c40
-rw-r--r--games/larn/moreobj.c4
-rw-r--r--games/larn/movem.c2
-rw-r--r--games/larn/object.c12
-rw-r--r--games/larn/regen.c8
-rw-r--r--games/larn/scores.c16
-rw-r--r--games/larn/signal.c6
-rw-r--r--games/larn/store.c24
-rw-r--r--games/larn/tok.c14
18 files changed, 151 insertions, 151 deletions
diff --git a/games/larn/create.c b/games/larn/create.c
index 46c09c9..ba0802c 100644
--- a/games/larn/create.c
+++ b/games/larn/create.c
@@ -223,7 +223,7 @@ treasureroom(lv)
for (tx=1+rnd(10); tx<MAXX-10; tx+=10)
if ( (lv==MAXLEVEL-1) || (lv==MAXLEVEL+MAXVLEVEL-1) || rnd(13)==2)
{
- xsize = rnd(6)+3; ysize = rnd(3)+3;
+ xsize = rnd(6)+3; ysize = rnd(3)+3;
ty = rnd(MAXY-9)+1; /* upper left corner of room */
if (lv==MAXLEVEL-1 || lv==MAXLEVEL+MAXVLEVEL-1)
troom(lv,xsize,ysize,tx=tx+rnd(MAXX-24),ty,rnd(3)+6);
@@ -232,8 +232,8 @@ treasureroom(lv)
}
/*
- * subroutine to create a treasure room of any size at a given location
- * room is filled with objects and monsters
+ * subroutine to create a treasure room of any size at a given location
+ * room is filled with objects and monsters
* the coordinate given is that of the upper left corner of the room
*/
troom(lv,xsize,ysize,tx,ty,glyph)
@@ -247,7 +247,7 @@ troom(lv,xsize,ysize,tx,ty,glyph)
for (j=ty; j<ty+ysize; j++)
for (i=tx; i<tx+xsize; i++) /* now put in the walls */
{
- item[i][j]=OWALL; mitem[i][j]=0;
+ item[i][j]=OWALL; mitem[i][j]=0;
}
for (j=ty+1; j<ty+ysize-1; j++)
for (i=tx+1; i<tx+xsize-1; i++) /* now clear out interior */
diff --git a/games/larn/data.c b/games/larn/data.c
index a8739ba..4a113bd 100644
--- a/games/larn/data.c
+++ b/games/larn/data.c
@@ -47,7 +47,7 @@ static char aa2[] = "apprentice demi-god";
static char aa3[] = " minor demi-god ";
static char aa4[] = " major demi-god ";
static char aa5[] = " minor deity ";
-static char aa6[] = " major deity ";
+static char aa6[] = " major deity ";
static char aa7[] = " novice guardian ";
static char aa8[] = "apprentice guardian";
static char aa9[] = " The Creator ";
@@ -456,7 +456,7 @@ char spelweird[MAXMONST+8][SPNUM] = {
/* p m d s c s w s e h c c p i b c p c h c v d l d g f f s h s t m s g s w a p */
/* r l e l h s e t n e b r h n a l l a a k p r i r l l g c l t e f p e u t l e */
/* o e x e m p b r l l l e a v l d y n s l r y t l o o r a d p l i h n m w t r */
-
+
/* bat */ { 0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0, 0,0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,0 },
/* gnome */ { 0,0,0,0,0,0, 0,0,0,0,0,0,0,5, 0,0,0,0,0,0,0, 0,0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,0 },
@@ -608,7 +608,7 @@ char is_alpha[]= /* isalpha[character] = TRUE || FALSE */
};
/*
- * function to create scroll numbers with appropriate probability of
+ * function to create scroll numbers with appropriate probability of
* occurrence
*
* 0 - armor 1 - weapon 2 - enlightenment 3 - paper
diff --git a/games/larn/diag.c b/games/larn/diag.c
index 4ed557d..0996558 100644
--- a/games/larn/diag.c
+++ b/games/larn/diag.c
@@ -87,7 +87,7 @@ diag()
for (j=0; j<SPNUM; j++)
{
lprc(' '); lprcat(spelcode[j]);
- lprintf(" %21s %s\n",spelname[j],speldescript[j]);
+ lprintf(" %21s %s\n",spelname[j],speldescript[j]);
}
lprcat("\n\nFor the c[] array:\n");
diff --git a/games/larn/display.c b/games/larn/display.c
index b49de50..951d449 100644
--- a/games/larn/display.c
+++ b/games/larn/display.c
@@ -100,7 +100,7 @@ bot_hpx()
{
recalc(); bot_linex();
}
- else botsub(makecode(HP,5,19),"%3d");
+ else botsub(makecode(HP,5,19),"%3d");
}
/*
@@ -203,7 +203,7 @@ drawscreen()
{
d_flag=1; clear(); /* clear the screen */
}
- else
+ else
{
d_flag=0; cursor(1,1);
}
@@ -229,7 +229,7 @@ drawscreen()
}
while (j <= m)
{
- if (j <= m-3)
+ if (j <= m-3)
{
for (k=j; k<=j+3; k++) if (screen[k][i] != ' ') k=1000;
if (k < 1000)
@@ -287,7 +287,7 @@ showcell(x,y)
else switch(k=item[i][j])
{
case OWALL: case 0: case OIVTELETRAP: case OTRAPARROWIV:
- case OIVDARTRAP: case OIVTRAPDOOR:
+ case OIVDARTRAP: case OIVTRAPDOOR:
lprc(objnamelist[k]); break;
default: setbold(); lprc(objnamelist[k]); resetbold();
@@ -311,8 +311,8 @@ show1cell(x,y)
if ((k=mitem[x][y]) != 0) lprc(monstnamelist[k]);
else switch(k=item[x][y])
{
- case OWALL: case 0: case OIVTELETRAP: case OTRAPARROWIV:
- case OIVDARTRAP: case OIVTRAPDOOR:
+ case OWALL: case 0: case OIVTELETRAP: case OTRAPARROWIV:
+ case OIVDARTRAP: case OIVTRAPDOOR:
lprc(objnamelist[k]); break;
default: setbold(); lprc(objnamelist[k]); resetbold();
diff --git a/games/larn/global.c b/games/larn/global.c
index 80a3dd4..bd84389 100644
--- a/games/larn/global.c
+++ b/games/larn/global.c
@@ -23,7 +23,7 @@ extern int score[],srcount,dropflag;
extern int random;/* the random number seed */
extern short playerx,playery,lastnum;
extern char cheat,level,monstnamelist[];
-extern char lastmonst[],*what[],*who[];
+extern char lastmonst[],*what[],*who[];
extern char winner[];
extern char logname[],monstlevel[];
extern char sciv[SCORESIZE+1][26][2],*potionname[],*scrollname[];
@@ -208,7 +208,7 @@ losemspells(x)
int lev;
function to return monster number for a randomly selected monster
- for the given cave level
+ for the given cave level
*/
makemonst(lev)
register int lev;
@@ -251,7 +251,7 @@ recalc()
{
register int i,j,k;
c[AC] = c[MOREDEFENSES];
- if (c[WEAR] >= 0)
+ if (c[WEAR] >= 0)
switch(iven[c[WEAR]])
{
case OSHIELD: c[AC] += 2 + ivenarg[c[WEAR]]; break;
@@ -324,7 +324,7 @@ quit()
if ((i == 'n') || (i == '\33')) { lprcat(" no"); lflush(); return; }
lprcat("\n"); setbold(); lprcat("Yes"); resetbold(); lprcat(" or ");
setbold(); lprcat("No"); resetbold(); lprcat(" please? Do you want to quit? ");
- }
+ }
}
/*
@@ -387,7 +387,7 @@ drop_object(k)
item[playerx][playery] = itm;
iarg[playerx][playery] = ivenarg[k];
srcount=0; lprcat("\n You drop:"); show3(k); /* show what item you dropped*/
- know[playerx][playery] = 0; iven[k]=0;
+ know[playerx][playery] = 0; iven[k]=0;
if (c[WIELD]==k) c[WIELD]= -1; if (c[WEAR]==k) c[WEAR] = -1;
if (c[SHIELD]==k) c[SHIELD]= -1;
adjustcvalues(itm,ivenarg[k]);
@@ -430,7 +430,7 @@ enchweapon()
*/
pocketfull()
{
- register int i,limit;
+ register int i,limit;
if ((limit = 15+(c[LEVEL]>>1)) > 26) limit=26;
for (i=0; i<limit; i++) if (iven[i]==0) return(0);
return(1);
diff --git a/games/larn/header.h b/games/larn/header.h
index f667345..37293b5 100644
--- a/games/larn/header.h
+++ b/games/larn/header.h
@@ -219,7 +219,7 @@ struct sphere
#define OSCROLL 41
#define OPOTION 42
#define OBOOK 43
-#define OCHEST 44
+#define OCHEST 44
#define OAMULET 45
#define OORBOFDRAGON 46
@@ -260,48 +260,48 @@ struct sphere
/* defines for the monsters as objects */
-#define BAT 1
-#define GNOME 2
-#define HOBGOBLIN 3
-#define JACKAL 4
-#define KOBOLD 5
-#define ORC 6
+#define BAT 1
+#define GNOME 2
+#define HOBGOBLIN 3
+#define JACKAL 4
+#define KOBOLD 5
+#define ORC 6
#define SNAKE 7
#define CENTIPEDE 8
-#define JACULI 9
-#define TROGLODYTE 10
-#define ANT 11
-#define EYE 12
+#define JACULI 9
+#define TROGLODYTE 10
+#define ANT 11
+#define EYE 12
#define LEPRECHAUN 13
-#define NYMPH 14
-#define QUASIT 15
-#define RUSTMONSTER 16
-#define ZOMBIE 17
-#define ASSASSINBUG 18
-#define BUGBEAR 19
-#define HELLHOUND 20
-#define ICELIZARD 21
-#define CENTAUR 22
-#define TROLL 23
-#define YETI 24
-#define WHITEDRAGON 25
-#define ELF 26
-#define CUBE 27
-#define METAMORPH 28
-#define VORTEX 29
-#define ZILLER 30
-#define VIOLETFUNGI 31
-#define WRAITH 32
-#define FORVALAKA 33
-#define LAMANOBE 34
-#define OSEQUIP 35
-#define ROTHE 36
-#define XORN 37
-#define VAMPIRE 38
-#define INVISIBLESTALKER 39
-#define POLTERGEIST 40
-#define DISENCHANTRESS 41
-#define SHAMBLINGMOUND 42
+#define NYMPH 14
+#define QUASIT 15
+#define RUSTMONSTER 16
+#define ZOMBIE 17
+#define ASSASSINBUG 18
+#define BUGBEAR 19
+#define HELLHOUND 20
+#define ICELIZARD 21
+#define CENTAUR 22
+#define TROLL 23
+#define YETI 24
+#define WHITEDRAGON 25
+#define ELF 26
+#define CUBE 27
+#define METAMORPH 28
+#define VORTEX 29
+#define ZILLER 30
+#define VIOLETFUNGI 31
+#define WRAITH 32
+#define FORVALAKA 33
+#define LAMANOBE 34
+#define OSEQUIP 35
+#define ROTHE 36
+#define XORN 37
+#define VAMPIRE 38
+#define INVISIBLESTALKER 39
+#define POLTERGEIST 40
+#define DISENCHANTRESS 41
+#define SHAMBLINGMOUND 42
#define YELLOWMOLD 43
#define UMBERHULK 44
#define GNOMEKING 45
diff --git a/games/larn/help.c b/games/larn/help.c
index 0f21367..a8fd45c 100644
--- a/games/larn/help.c
+++ b/games/larn/help.c
@@ -1,7 +1,7 @@
/* help.c Larn is copyrighted 1986 by Noah Morgan. */
#include "header.h"
/*
- * help function to display the help info
+ * help function to display the help info
*
* format of the .larn.help file
*
diff --git a/games/larn/io.c b/games/larn/io.c
index dc0d5e7..8fda49d 100644
--- a/games/larn/io.c
+++ b/games/larn/io.c
@@ -43,7 +43,7 @@
* cursors() position cursor at [1,24] (saves memory)
* cl_line(x,y) Clear line at [1,y] and leave cursor at [x,y]
* cl_up(x,y) Clear screen from [x,1] to current line.
- * cl_dn(x,y) Clear screen from [1,y] to end of display.
+ * cl_dn(x,y) Clear screen from [1,y] to end of display.
* standout(str) Print the string in standout mode.
* set_score_output() Called when output should be literally printed.
** putchar(ch) Print one character in decoded output buffer.
@@ -99,7 +99,7 @@ static char lgetwbuf[LINBUFSIZE]; /* get line (word) buffer */
/*
* setupvt100() Subroutine to set up terminal in correct mode for game
*
- * Attributes off, clear screen, set scrolling region, set tty mode
+ * Attributes off, clear screen, set scrolling region, set tty mode
*/
setupvt100()
{
@@ -109,7 +109,7 @@ setupvt100()
/*
* clearvt100() Subroutine to clean up terminal when the game is over
*
- * Attributes off, clear screen, unset scrolling region, restore tty mode
+ * Attributes off, clear screen, unset scrolling region, restore tty mode
*/
clearvt100()
{
@@ -170,7 +170,7 @@ newgame()
* and any needed arguments following it
* Note: lprintf() only supports %s, %c and %d, with width modifier and left
* or right justification.
- * No correct checking for output buffer overflow is done, but flushes
+ * No correct checking for output buffer overflow is done, but flushes
* are done beforehand if needed.
* Returns nothing of value.
*/
@@ -204,7 +204,7 @@ va_dcl
va_start(ap); /* initialize the var args pointer */
fmt = va_arg(ap, char *); /* pointer to format string */
- if (lpnt >= lpend) lflush();
+ if (lpnt >= lpend) lflush();
outb = lpnt;
for ( ; ; )
{
@@ -229,7 +229,7 @@ va_dcl
cont=0; break;
case 's': tmpb = va_arg(ap, char *);
- if (wide==0) { while (*outb++ = *tmpb++); --outb; }
+ if (wide==0) { while (*outb++ = *tmpb++); --outb; }
else
{
n = wide - strlen(tmpb);
@@ -290,7 +290,7 @@ lprint(x)
* lwrite(buf,len) write a buffer to the output buffer
* char *buf;
* int len;
- *
+ *
* Enter with the address and number of bytes to write out
* Returns nothing of value
*/
@@ -313,7 +313,7 @@ lwrite(buf,len)
lflush();
write(lfd,buf,len);
#endif VT100
- }
+ }
else while (len)
{
if (lpnt >= lpend) lflush(); /* if buffer is full flush it */
@@ -451,7 +451,7 @@ lcreat(str)
{
lpnt = lpbuf; lpend = lpbuf+BUFBIG;
if (str==NULL) return(lfd=1);
- if ((lfd=creat(str,0644)) < 0)
+ if ((lfd=creat(str,0644)) < 0)
{
lfd=1; lprintf("error creating file <%s>\n",str); lflush(); return(-1);
}
@@ -525,7 +525,7 @@ lprcat(str)
register char *str;
{
register char *str2;
- if (lpnt >= lpend) lflush();
+ if (lpnt >= lpend) lflush();
str2 = lpnt;
while (*str2++ = *str++);
lpnt = str2 - 1;
@@ -536,7 +536,7 @@ lprcat(str)
* cursor(x,y) Subroutine to set the cursor position
*
* x and y are the cursor coordinates, and lpbuff is the output buffer where
- * escape sequence will be placed.
+ * escape sequence will be placed.
*/
static char *y_num[]= { "\33[","\33[","\33[2","\33[3","\33[4","\33[5","\33[6",
"\33[7","\33[8","\33[9","\33[10","\33[11","\33[12","\33[13","\33[14",
@@ -611,9 +611,9 @@ init_term()
switch (tgetent(termbuf, term = getenv("TERM")))
{
- case -1:
+ case -1:
write(2, "Cannot open termcap file.\n", 26); exit();
- case 0:
+ case 0:
write(2, "Cannot find entry of ", 21);
write(2, term, strlen (term));
write(2, " in termcap\n", 12);
@@ -870,9 +870,9 @@ flush_buf()
/*
* char *tmcapcnv(sd,ss) Routine to convert VT100 escapes to termcap format
*
- * Processes only the \33[#m sequence (converts . files for termcap use
+ * Processes only the \33[#m sequence (converts . files for termcap use
*/
-char *tmcapcnv(sd,ss)
+char *tmcapcnv(sd,ss)
register char *sd,*ss;
{
register int tmstate=0; /* 0=normal, 1=\33 2=[ 3=# */
diff --git a/games/larn/main.c b/games/larn/main.c
index 36c1665..d75ee9b 100644
--- a/games/larn/main.c
+++ b/games/larn/main.c
@@ -71,7 +71,7 @@ main(argc,argv)
sprintf(optsfile, "%s/.larnopts",ptr); /* the .larnopts filename */
/*
- * now malloc the memory for the dungeon
+ * now malloc the memory for the dungeon
*/
cell = (struct cel *)malloc(sizeof(struct cel)*(MAXLEVEL+MAXVLEVEL)*MAXX*MAXY);
if (cell == 0) died(-285); /* malloc failure */
@@ -96,13 +96,13 @@ main(argc,argv)
#endif VT100
/*
- * now make scoreboard if it is not there (don't clear)
+ * now make scoreboard if it is not there (don't clear)
*/
if (access(scorefile,0) == -1) /* not there */
makeboard();
/*
- * now process the command line arguments
+ * now process the command line arguments
*/
for (i=1; i<argc; i++)
{
@@ -128,7 +128,7 @@ main(argc,argv)
case '0': case '1': case '2': case '3': case '4': case '5':
case '6': case '7': case '8': case '9': /* for hardness */
- sscanf(&argv[i][1],"%d",&hard);
+ sscanf(&argv[i][1],"%d",&hard);
break;
case 'h': /* print out command line arguments */
@@ -174,7 +174,7 @@ main(argc,argv)
argv[0] = psname; execv(psname,argv);
}
}
- else
+ else
unlink(psname);
}
@@ -317,7 +317,7 @@ showwear()
}
/*
- function to show the things player can wield only
+ function to show the things player can wield only
*/
showwield()
{
@@ -442,7 +442,7 @@ show1(idx,str2)
show3(index)
register int index;
{
- switch(iven[index])
+ switch(iven[index])
{
case OPOTION: show1(index,potionname); break;
case OSCROLL: show1(index,scrollname); break;
@@ -530,7 +530,7 @@ parse()
case '?': yrepcount=0; help(); nomove=1; return; /* give the help screen*/
- case 'S': clear(); lprcat("Saving . . ."); lflush();
+ case 'S': clear(); lprcat("Saving . . ."); lflush();
savegame(savefilename); wizard=1; died(-257); /* save the game - doesn't return */
case 'Z': yrepcount=0; if (c[LEVEL]>9) { oteleport(1); return; }
@@ -622,7 +622,7 @@ parse()
return;
#endif
#endif
- case 'P': cursors();
+ case 'P': cursors();
if (outstanding_taxes>0)
lprintf("\nYou presently owe %d gp in taxes.",(long)outstanding_taxes);
else
@@ -654,7 +654,7 @@ run(dir)
/*
function to wield a weapon
*/
-wield()
+wield()
{
register int i;
while (1)
@@ -722,7 +722,7 @@ dropobj()
while (1)
{
if ((i = whatitem("drop"))=='\33') return;
- if (i=='*') showstr(); else
+ if (i=='*') showstr(); else
{
if (i=='.') /* drop some gold */
{
@@ -743,7 +743,7 @@ dropobj()
{ *p=OKGOLD; i=amt/1000; amt = 1000*i; }
else
{ *p=OKGOLD; i=32767; amt = 32767000L; }
- c[GOLD] -= amt;
+ c[GOLD] -= amt;
lprintf("You drop %d gold pieces",(long)amt);
iarg[playerx][playery]=i; bottomgold();
know[playerx][playery]=0; dropflag=1; return;
diff --git a/games/larn/monster.c b/games/larn/monster.c
index 6ec0865..649f925 100644
--- a/games/larn/monster.c
+++ b/games/larn/monster.c
@@ -1,5 +1,5 @@
/*
- * monster.c Larn is copyrighted 1986 by Noah Morgan.
+ * monster.c Larn is copyrighted 1986 by Noah Morgan.
*
* This file contains the following functions:
* ----------------------------------------------------------------------------
@@ -324,7 +324,7 @@ speldamage(x)
*p=OBOOK; iarg[i][j]=level; *kn=0;
}
break;
-
+
case OTHRONE: *pm=GNOMEKING; *kn=0; *p= OTHRONE2;
hitp[i][j]=monster[GNOMEKING].hitpoints; break;
@@ -409,12 +409,12 @@ speldamage(x)
for (i=0; i<MAXX; i++) /* save all items and monsters */
{
xl = item[i][j];
- if (xl && xl!=OWALL && xl!=OANNIHILATION)
+ if (xl && xl!=OWALL && xl!=OANNIHILATION)
{
save[sc].type=0; save[sc].id=item[i][j];
save[sc++].arg=iarg[i][j];
}
- if (mitem[i][j])
+ if (mitem[i][j])
{
save[sc].type=1; save[sc].id=mitem[i][j];
save[sc++].arg=hitp[i][j];
@@ -505,7 +505,7 @@ fullhit(xx)
register int i;
if (xx<0 || xx>20) return(0); /* fullhits are out of range */
if (c[LANCEDEATH]) return(10000); /* lance of death */
- i = xx * ((c[WCLASS]>>1)+c[STRENGTH]+c[STREXTRA]-c[HARDGAME]-12+c[MOREDAM]);
+ i = xx * ((c[WCLASS]>>1)+c[STRENGTH]+c[STREXTRA]-c[HARDGAME]-12+c[MOREDAM]);
return( (i>=1) ? i : xx );
}
@@ -546,7 +546,7 @@ direct(spnum,dam,str,arg)
}
else
{
- lastnum=278;
+ lastnum=278;
lprintf(str,"spell caster (thats you)",(long)arg);
beep(); losehp(dam); return;
}
@@ -566,7 +566,7 @@ direct(spnum,dam,str,arg)
* Function to hit in a direction from a missile weapon and have it keep
* on going in that direction until its power is exhausted
* Enter with the spell number in spnum, the power of the weapon in hp,
- * lprintf format string in str, the # of milliseconds to delay between
+ * lprintf format string in str, the # of milliseconds to delay between
* locations in delay, and the character to represent the weapon in cshow.
* Returns no value.
*/
@@ -741,12 +741,12 @@ dirsub(x,y)
switch(getchar())
{
case 'b': i++;
- case 'n': i++;
- case 'y': i++;
+ case 'n': i++;
+ case 'y': i++;
case 'u': i++;
- case 'h': i++;
+ case 'h': i++;
case 'k': i++;
- case 'l': i++;
+ case 'l': i++;
case 'j': i++; goto out;
};
out:
@@ -820,7 +820,7 @@ hitmonster(x,y)
if ((rnd(20) < tmp-c[HARDGAME]) || (rnd(71) < 5)) /* need at least random chance to hit */
{
lprcat("\nYou hit"); flag=1;
- damag = fullhit(1);
+ damag = fullhit(1);
if (damag<9999) damag=rnd(damag)+1;
}
else
@@ -910,7 +910,7 @@ hitplayer(x,y)
hitflag = hit2flag = hit3flag = 1;
yrepcount=0;
cursors(); ifblind(x,y);
- if (c[INVISIBILITY]) if (rnd(33)<20)
+ if (c[INVISIBILITY]) if (rnd(33)<20)
{
lprintf("\nThe %s misses wildly",lastmonst); return;
}
@@ -1002,7 +1002,7 @@ something(level)
* Enter with the cave level and a pointer to the items arg
*/
static char nobjtab[] = { 0, OSCROLL, OSCROLL, OSCROLL, OSCROLL, OPOTION,
- OPOTION, OPOTION, OPOTION, OGOLDPILE, OGOLDPILE, OGOLDPILE, OGOLDPILE,
+ OPOTION, OPOTION, OPOTION, OGOLDPILE, OGOLDPILE, OGOLDPILE, OGOLDPILE,
OBOOK, OBOOK, OBOOK, OBOOK, ODAGGER, ODAGGER, ODAGGER, OLEATHER, OLEATHER,
OLEATHER, OREGENRING, OPROTRING, OENERGYRING, ODEXRING, OSTRRING, OSPEAR,
OBELT, ORING, OSTUDLEATHER, OSHIELD, OFLAIL, OCHAIN, O2SWORD, OPLATE,
@@ -1013,7 +1013,7 @@ newobject(lev,i)
{
register int tmp=32,j;
if (level<0 || level>MAXLEVEL+MAXVLEVEL) return(0); /* correct level? */
- if (lev>6) tmp=37; else if (lev>4) tmp=35;
+ if (lev>6) tmp=37; else if (lev>4) tmp=35;
j = nobjtab[tmp=rnd(tmp)]; /* the object type */
switch(tmp)
{
@@ -1032,7 +1032,7 @@ newobject(lev,i)
case 29: case 31: *i=rund(lev/2+1); if (*i==0) return(0); break;
case 34: *i=newchain(); break;
case 36: *i=newplate(); break;
- case 37: *i=newsword(); break;
+ case 37: *i=newsword(); break;
}
return(j);
}
@@ -1067,7 +1067,7 @@ newobject(lev,i)
*
* char rustarm[ARMORTYPES][2];
* special array for maximum rust damage to armor from rustmonster
- * format is: { armor type , minimum attribute
+ * format is: { armor type , minimum attribute
*/
#define ARMORTYPES 6
static char rustarm[ARMORTYPES][2] = { OSTUDLEATHER,-2, ORING,-4, OCHAIN,-5,
@@ -1093,7 +1093,7 @@ spattack(x,xx,yy)
if (m == rustarm[i][0]) /* find his armor in table */
{
if (--ivenarg[k]< rustarm[i][1])
- ivenarg[k]= rustarm[i][1]; else j=1;
+ ivenarg[k]= rustarm[i][1]; else j=1;
break;
}
}
@@ -1162,7 +1162,7 @@ spattack(x,xx,yy)
p="\nThe %s nearly misses"; break;
}
break;
- }
+ }
break;
case 10: p="\nThe %s hit you with his barbed tail";
@@ -1326,7 +1326,7 @@ rmsphere(x,y)
{
item[x][y]=mitem[x][y]=0; know[x][y]=1;
show1cell(x,y); /* show the now missing sphere */
- --c[SPHCAST];
+ --c[SPHCAST];
if (sp==spheres) { sp2=sp; spheres=sp->p; free((char*)sp2); }
else
{ sp2->p = sp->p; free((char*)sp); }
diff --git a/games/larn/moreobj.c b/games/larn/moreobj.c
index f834b1a..343773e 100644
--- a/games/larn/moreobj.c
+++ b/games/larn/moreobj.c
@@ -30,7 +30,7 @@ oaltar()
case 'p': lprcat(" pray\nDo you (m) give money or (j) just pray? ");
while (1) switch(getchar())
{
- case 'j': if (rnd(100)<75)
+ case 'j': if (rnd(100)<75)
lprcat("\nnothing happens");
else if (rnd(13)<4) ohear();
else if (rnd(43) == 10)
@@ -212,7 +212,7 @@ ochest()
lprcat("\nYou begin to lose hand to eye coordination!");
beep();
break;
-
+
case 3: c[HALFDAM]+= rnd(1600)+200;
beep();
lprcat("\nA sickness engulfs you!"); break;
diff --git a/games/larn/movem.c b/games/larn/movem.c
index 7239a06..d50d3ac 100644
--- a/games/larn/movem.c
+++ b/games/larn/movem.c
@@ -245,7 +245,7 @@ mmove(aa,bb,cc,dd)
if (i==OTELEPORTER) /* monster hits teleport trap */
{ flag=3; fillmonst(mitem[cc][dd]); mitem[cc][dd]=0; }
if (c[BLINDCOUNT]) return; /* if blind don't show where monsters are */
- if (know[cc][dd] & 1)
+ if (know[cc][dd] & 1)
{
p=0;
if (flag) cursors();
diff --git a/games/larn/object.c b/games/larn/object.c
index 9bf7c3c..769bf20 100644
--- a/games/larn/object.c
+++ b/games/larn/object.c
@@ -67,7 +67,7 @@ switch(i)
case OTELEPORTER: lprcat("\nZaaaappp! You've been teleported!\n");
beep(); nap(3000); oteleport(0);
- break;
+ break;
case OSCHOOL: if (nearbymonst()) return;
lprcat("\n\nYou have found the College of Larn.");
@@ -133,7 +133,7 @@ switch(i)
{
case 6: c[AGGRAVATE] += rnd(400); break;
- case 7: lprcat("\nYou are jolted by an electric shock ");
+ case 7: lprcat("\nYou are jolted by an electric shock ");
lastnum=274; losehp(rnd(20)); bottomline(); break;
case 8: loselevel(); break;
@@ -172,7 +172,7 @@ switch(i)
if (level!=0) { lprcat("\nThe shaft only extends 5 feet downward!"); return; }
if (packweight() > 45+3*(c[STRENGTH]+c[STREXTRA])) { lprcat("\nYou slip and fall down the shaft"); beep();
lastnum=275; losehp(30+rnd(20)); bottomhp(); }
-
+
else lprcat("climb down"); nap(3000); newcavelevel(MAXLEVEL);
for (i=0; i<MAXY; i++) for (j=0; j<MAXX; j++) /* put player near volcano shaft */
if (item[j][i]==OVOLUP) { playerx=j; playery=i; j=MAXX; i=MAXY; positionplayer(); }
@@ -382,7 +382,7 @@ opotion(pot)
return;
};
}
-
+
/*
function to drink a potion
*/
@@ -423,7 +423,7 @@ quaffpotion(pot)
case 2: lprcat("\nSuddenly, you feel much more skillful!");
raiselevel(); raisemhp(1); return;
- case 3: lprcat("\nYou feel strange for a moment");
+ case 3: lprcat("\nYou feel strange for a moment");
c[rund(6)]++; break;
case 4: lprcat("\nYou feel more self confident!");
@@ -571,7 +571,7 @@ read_scroll(typ)
case 6: c[AGGRAVATE]+=800; return; /* aggravate monsters */
- case 7: gtime += (i = rnd(1000) - 850); /* time warp */
+ case 7: gtime += (i = rnd(1000) - 850); /* time warp */
if (i>=0) lprintf("\nYou went forward in time by %d mobuls",(long)((i+99)/100));
else lprintf("\nYou went backward in time by %d mobuls",(long)(-(i+99)/100));
adjtime((long)i); /* adjust time for time warping */
diff --git a/games/larn/regen.c b/games/larn/regen.c
index b9f7a0f..993cc8b 100644
--- a/games/larn/regen.c
+++ b/games/larn/regen.c
@@ -51,9 +51,9 @@ regen()
if (d[CANCELLATION]) if ((--d[CANCELLATION]) <= 0) flag=1;
if (d[WTW]) if ((--d[WTW]) <= 0) flag=1;
if (d[HASTESELF]) if ((--d[HASTESELF]) <= 0) flag=1;
- if (d[AGGRAVATE]) --d[AGGRAVATE];
- if (d[SCAREMONST]) if ((--d[SCAREMONST]) <= 0) flag=1;
- if (d[STEALTH]) if ((--d[STEALTH]) <= 0) flag=1;
+ if (d[AGGRAVATE]) --d[AGGRAVATE];
+ if (d[SCAREMONST]) if ((--d[SCAREMONST]) <= 0) flag=1;
+ if (d[STEALTH]) if ((--d[STEALTH]) <= 0) flag=1;
if (d[AWARENESS]) --d[AWARENESS];
if (d[HOLDMONST]) if ((--d[HOLDMONST]) <= 0) flag=1;
if (d[HASTEMONST]) --d[HASTEMONST];
@@ -73,7 +73,7 @@ regen()
if (rnd(100)<50)
{
d[WEAR]=d[SHIELD]= -1; cursors();
- lprcat("\nThe hysteria of itching forces you to remove your armor!");
+ lprcat("\nThe hysteria of itching forces you to remove your armor!");
beep(); recalc(); bottomline();
}
if (--d[ITCHING]<=0) { cursors(); lprcat("\nYou now feel the irritation subside!"); beep(); }
diff --git a/games/larn/scores.c b/games/larn/scores.c
index f6cf15c..e7771a6 100644
--- a/games/larn/scores.c
+++ b/games/larn/scores.c
@@ -13,8 +13,8 @@
* showallscores() Function to show scores and the iven lists that go with them
* sortboard() Function to sort the scoreboard
* newscore(score, whoo, whyded, winner) Function to add entry to scoreboard
- * new1sub(score,i,whoo,taxes) Subroutine to put player into a
- * new2sub(score,i,whoo,whyded) Subroutine to put player into a
+ * new1sub(score,i,whoo,taxes) Subroutine to put player into a
+ * new2sub(score,i,whoo,whyded) Subroutine to put player into a
* died(x) Subroutine to record who played larn, and what the score was
* diedsub(x) Subroutine to print out a line showing player when he is killed
* diedlog() Subroutine to read a log file and print it out in ascii format
@@ -187,7 +187,7 @@ long paytaxes(x)
/*
* winshou() Subroutine to print out the winning scoreboard
*
- * Returns the number of players on scoreboard that were shown
+ * Returns the number of players on scoreboard that were shown
*/
winshou()
{
@@ -224,7 +224,7 @@ winshou()
* int x;
*
* Enter with 0 to list the scores, enter with 1 to list inventories too
- * Returns the number of players on scoreboard that were shown
+ * Returns the number of players on scoreboard that were shown
*/
shou(x)
int x;
@@ -275,7 +275,7 @@ showscores()
{
register int i,j;
lflush(); lcreat((char*)0); if (readboard()<0) return;
- i=winshou(); j=shou(0);
+ i=winshou(); j=shou(0);
if (i+j == 0) lprcat(esb); else lprc('\n');
lflush();
}
@@ -369,7 +369,7 @@ newscore(score, whoo, whyded, winner)
}
/*
- * new1sub(score,i,whoo,taxes) Subroutine to put player into a
+ * new1sub(score,i,whoo,taxes) Subroutine to put player into a
* int score,i,whyded,taxes; winning scoreboard entry if his score
* char *whoo; is high enough
*
@@ -395,7 +395,7 @@ new1sub(score,i,whoo,taxes)
}
/*
- * new2sub(score,i,whoo,whyded) Subroutine to put player into a
+ * new2sub(score,i,whoo,whyded) Subroutine to put player into a
* int score,i,whyded,taxes; non-winning scoreboard entry if his
* char *whoo; score is high enough
*
@@ -611,7 +611,7 @@ diedlog()
* it will try to make a new entry in the file. Only returns -1 if can't
* find him in the file, and can't make a new entry in the file.
* Format of playerids file:
- * Id # in ascii \n character name \n
+ * Id # in ascii \n character name \n
*/
static int havepid= -1; /* playerid # if previously done */
getplid(nam)
diff --git a/games/larn/signal.c b/games/larn/signal.c
index 60bd6ce..b4c0a20 100644
--- a/games/larn/signal.c
+++ b/games/larn/signal.c
@@ -5,7 +5,7 @@ extern char savefilename[],wizard,predostuff,nosignal;
static s2choose() /* text to be displayed if ^C during intro screen */
{
cursor(1,24); lprcat("Press "); setbold(); lprcat("return"); resetbold();
- lprcat(" to continue: "); lflush();
+ lprcat(" to continue: "); lflush();
}
static void
@@ -61,7 +61,7 @@ static void sigpipe() { sigpanic(SIGPIPE); }
static void sigterm() { sigpanic(SIGTERM); }
sigsetup()
{
- signal(SIGQUIT, cntlc); signal(SIGINT, cntlc);
+ signal(SIGQUIT, cntlc); signal(SIGINT, cntlc);
signal(SIGKILL, SIG_IGN); signal(SIGHUP, sgam);
signal(SIGILL, sigill); signal(SIGTRAP, sigtrap);
signal(SIGIOT, sigiot); signal(SIGEMT, sigemt);
@@ -143,6 +143,6 @@ sigpanic(sig)
sprintf(buf,"\nLarn - Panic! Signal %d received [%s]",sig,signame[sig]);
write(2,buf,strlen(buf)); sleep(2);
sncbr();
- savegame(savefilename);
+ savegame(savefilename);
kill(getpid(),sig); /* this will terminate us */
}
diff --git a/games/larn/store.c b/games/larn/store.c
index 904cfad..70d4779 100644
--- a/games/larn/store.c
+++ b/games/larn/store.c
@@ -211,7 +211,7 @@ dndstore()
lprcat("\n\nThe Larn Revenue Service has ordered us to not do business with tax evaders.\n"); beep();
lprintf("They have also told us that you owe %d gp in back taxes, and as we must\n",(long)outstanding_taxes);
lprcat("comply with the law, we cannot serve you at this time. Soo Sorry.\n");
- cursors();
+ cursors();
lprcat("\nPress "); standout("escape"); lprcat(" to leave: "); lflush();
i=0;
while (i!='\33') i=getchar();
@@ -353,7 +353,7 @@ oschool()
cl_line(16,8);
c[STRENGTH] += 2; c[CONSTITUTION] += 2; break;
- case 'c': c[INTELLIGENCE] += 2;
+ case 'c': c[INTELLIGENCE] += 2;
lprcat("\nThe task before you now seems more attainable!");
cl_line(16,9); break;
@@ -366,15 +366,15 @@ oschool()
cl_line(16,10);
c[INTELLIGENCE] += 2; break;
- case 'e': c[CHARISMA] += 3;
+ case 'e': c[CHARISMA] += 3;
lprcat("\nYou now feel like a born leader!");
cl_line(16,11); break;
- case 'f': c[WISDOM] += 2;
+ case 'f': c[WISDOM] += 2;
lprcat("\nYou now feel more confident that you can find the potion in time!");
cl_line(16,12); break;
- case 'g': c[DEXTERITY] += 3;
+ case 'g': c[DEXTERITY] += 3;
lprcat("\nYou feel like dancing!");
cl_line(16,13); break;
@@ -388,7 +388,7 @@ oschool()
{
gtime += time_used;
course[i-'a']++; /* remember that he has taken that course */
- c[HP] = c[HPMAX]; c[SPELLS] = c[SPELLMAX]; /* he regenerated */
+ c[HP] = c[HPMAX]; c[SPELLS] = c[SPELLMAX]; /* he regenerated */
if (c[BLINDCOUNT]) c[BLINDCOUNT]=1; /* cure blindness too! */
if (c[CONFUSE]) c[CONFUSE]=1; /* end confusion */
@@ -426,7 +426,7 @@ banktitle(str)
lprintf("levied taxes have been paid. They have also told us that you owe %d gp in\n",(long)outstanding_taxes);
lprcat("taxes, and we must comply with them. We cannot serve you at this time. Sorry.\n");
lprcat("We suggest you go to the LRS office and pay your taxes.\n");
- cursors();
+ cursors();
lprcat("\nPress "); standout("escape"); lprcat(" to leave: "); lflush();
i=0;
while (i!='\33') i=getchar();
@@ -465,7 +465,7 @@ obanksub()
for (k=i=0; i<26; i++)
switch(iven[i])
{
- case OLARNEYE: case ODIAMOND: case OEMERALD:
+ case OLARNEYE: case ODIAMOND: case OEMERALD:
case ORUBY: case OSAPPHIRE:
if (iven[i]==OLARNEYE)
@@ -505,7 +505,7 @@ obanksub()
if (amt<0) { lprcat("\nSorry, but we don't have any negative gold!"); nap(2000); amt=0; }
else if (amt > c[BANKACCOUNT])
{ lprcat("\nYou don't have that much in the bank!"); nap(2000); }
- else { c[GOLD] += amt; c[BANKACCOUNT] -= amt; }
+ else { c[GOLD] += amt; c[BANKACCOUNT] -= amt; }
break;
case 's': lprcat("\nWhich stone would you like to sell? ");
@@ -513,7 +513,7 @@ obanksub()
if (i=='*')
for (i=0; i<26; i++)
{
- if (gemvalue[i])
+ if (gemvalue[i])
{
c[GOLD]+=gemvalue[i]; iven[i]=0;
gemvalue[i]=0; k = gemorder[i];
@@ -523,7 +523,7 @@ obanksub()
}
else
{
- if (gemvalue[i=i-'a']==0)
+ if (gemvalue[i=i-'a']==0)
{
lprintf("\nItem %c is not a gemstone!",i+'a');
nap(2000); break;
@@ -567,7 +567,7 @@ appraise(gemstone)
lprcat("\nWould you like to sell it to us? "); yrepcount=0;
if (getyn()=='y') { lprcat("yes\n"); c[GOLD]+=amt; iven[j]=0; }
else lprcat("no thank you.\n");
- if (gemstone==OLARNEYE) lprcat("It is, of course, your privilege to keep the stone\n");
+ if (gemstone==OLARNEYE) lprcat("It is, of course, your privilege to keep the stone\n");
}
else lprcat("no\nO. K.\n");
}
diff --git a/games/larn/tok.c b/games/larn/tok.c
index ee4039b..d21848d 100644
--- a/games/larn/tok.c
+++ b/games/larn/tok.c
@@ -29,7 +29,7 @@ yylex()
if (hit2flag) { hit2flag=0; yrepcount=0; return(' '); }
if (yrepcount>0) { --yrepcount; return(lastok); } else yrepcount=0;
if (yrepcount==0) { bottomdo(); showplayer(); } /* show where the player is */
- lflush();
+ lflush();
while (1)
{
c[BYTESIN]++;
@@ -82,7 +82,7 @@ yylex()
setscroll();
return(lastok = 'L'-64); /* redisplay screen */
}
-
+
if ((cc <= '9') && (cc >= '0'))
{ yrepcount = yrepcount*10 + cc - '0'; }
else { if (yrepcount>0) --yrepcount; return(lastok = cc); }
@@ -105,14 +105,14 @@ flushall()
}
/*
- function to set the desired hardness
+ function to set the desired hardness
enter with hard= -1 for default hardness, else any desired hardness
*/
sethard(hard)
int hard;
{
register int j,k,i;
- j=c[HARDGAME]; hashewon();
+ j=c[HARDGAME]; hashewon();
if (restorflag==0) /* don't set c[HARDGAME] if restoring game */
{
if (hard >= 0) c[HARDGAME]= hard;
@@ -132,7 +132,7 @@ sethard(hard)
monster[j].armorclass = (i< -127) ? -127 : i;
i = (7*monster[j].experience)/(7+k) + 1;
monster[j].experience = (i<=0) ? 1 : i;
- }
+ }
}
/*
@@ -171,7 +171,7 @@ readopts()
{
if ((i=lgetw())==0) break;
if (strlen(i)>=MAXMNAME) i[MAXMNAME-1]=0;
- strcpy(usermonster[usermpoint],i);
+ strcpy(usermonster[usermpoint],i);
if (usermpoint >= MAXUM) break; /* defined all of em */
if (isalpha(j=usermonster[usermpoint][0]))
{
@@ -196,7 +196,7 @@ readopts()
else if (strcmp(i,"no-beep") == 0) nobeep=1;
break;
- case 'p': if (strcmp(i,"process-name:")== 0)
+ case 'p': if (strcmp(i,"process-name:")== 0)
{
if ((i=lgetw())==0) break;
if (strlen(i)>=PSNAMESIZE) i[PSNAMESIZE-1]=0;
OpenPOWER on IntegriCloud