* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
static char sccsid
[] = "@(#)shield.c 5.1 (Berkeley) %G%";
** SHIELD AND CLOAKING DEVICE CONTROL
** 'f' is one for auto shield up (in case of Condition RED),
** zero for shield control, and negative one for cloaking
** Called with an 'up' or 'down' on the same line, it puts
** the shields/cloak into the specified mode. Otherwise it
** reports to the user the current mode, and asks if she wishes
** This is not a free move. Hits that occur as a result of
** this move appear as though the shields are half up/down,
** so you get partial hits.
"u", "p", (int (*)())1, 0,
char *device
, *dev2
, *dev3
;
if (f
> 0 && (Ship
.shldup
|| damaged(SRSCAN
)))
return (printf("Ye Faire Queene does not have the cloaking device.\n"));
device
= "Cloaking device";
printf("%s %s down while docked\n", device
, dev2
);
r
= getcodpar("Up or down", Udtab
);
sprintf(s
, "%s %s up. Do you want %s down", device
, dev2
, dev3
);
sprintf(s
, "%s %s down. Do you want %s up", device
, dev2
, dev3
);
printf("%s already ", device
);
Ship
.energy
-= Param
.shupengy
;