* Copyright (c) 1983 Regents of the University of California.
* Redistribution and use in source and binary forms are permitted
* provided that the above copyright notice and this paragraph are
* duplicated in all such forms and that any documentation,
* advertising materials, and other materials related to such
* distribution and use acknowledge that the software was developed
* by the University of California, Berkeley. The name of the
* University may not be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
static char sccsid
[] = "@(#)pl_4.c 5.3 (Berkeley) %G%";
if (windspeed
== 6 || windspeed
== 5 && mc
->class > 4)
if (sgetch("Increase to Full sails? ",
(struct ship
*)0, 1) == 'y') {
Write(W_FS
, ms
, 0, 1, 0, 0, 0);
if (sgetch("Reduce to Battle sails? ",
(struct ship
*)0, 1) == 'y') {
Write(W_FS
, ms
, 0, 0, 0, 0, 0);
Signal("Sails rent to pieces", (struct ship
*)0);
sgetstr("Message? ", p
, sizeof buf
- 2);
Write(W_SIGNAL
, ms
, 1, (int)buf
, 0, 0, 0);
register struct ship
*sp
;
sgetstr("What ship? ", buf
, sizeof buf
);
c
= *countryname
[sp
->nationality
];
if ((c
== *buf
|| tolower(c
) == *buf
|| colours(sp
) == *buf
)
&& (sp
->file
->stern
== buf
[1] || sterncolour(sp
) == buf
[1]
register struct ship
*sp
;
if (sp
->file
->captain
[0])
return sp
->file
->captain
;
else if (sp
->file
->struck
)
else if (sp
->file
->captured
!= 0)
register struct ship
*ship
;
if (ship
->file
->dir
!= 0) {
Signal("Sail ho! (range %d, %s)",
(struct ship
*)0, range(ms
, ship
), saywhat(ship
, 0));
i
= portside(ms
, ship
, 1) - mf
->dir
;
Signal("%s (%c%c) %s %s %s.",
ship
, countryname
[ship
->nationality
],
classname
[ship
->specs
->class], directionname
[i
]);