-/* $NetBSD: dr_1.c,v 1.25 2009/03/14 19:35:13 dholland Exp $ */
+/* $NetBSD: dr_1.c,v 1.27 2009/03/14 22:52:52 dholland Exp $ */
/*
* Copyright (c) 1983, 1993
#if 0
static char sccsid[] = "@(#)dr_1.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: dr_1.c,v 1.25 2009/03/14 19:35:13 dholland Exp $");
+__RCSID("$NetBSD: dr_1.c,v 1.27 2009/03/14 22:52:52 dholland Exp $");
#endif
#endif /* not lint */
snprintf(message, sizeof(message),
"killed in melee: %d. %s: %d",
totalto, from->shipname, totalfrom);
- Writestr(W_SIGNAL, to, message);
+ send_signal(to, message);
if (key)
return 1;
} else if (strengthto >= fromstrength * 3) {
subtract(to, tocap, totalto, crewto, pcto);
if (key) {
if (fromcap != from)
- Write(W_POINTS, fromcap,
+ send_points(fromcap,
fromcap->file->points -
from->file->struck
? from->specs->pts
- : 2 * from->specs->pts,
- 0, 0, 0);
+ : 2 * from->specs->pts);
-/* ptr1 points to the shipspec for the ship that was just unboarded.
- I guess that what is going on here is that the pointer is multiplied
- or something. */
-
- Write(W_CAPTURED, from, to->file->index, 0, 0, 0);
+ send_captured(from, to->file->index);
topoints = 2 * from->specs->pts + to->file->points;
if (from->file->struck)
topoints -= from->specs->pts;
- Write(W_POINTS, to, topoints, 0, 0, 0);
+ send_points(to, topoints);
mento = crewto[0] ? crewto[0] : crewto[1];
if (mento) {
subtract(to, tocap, mento, crewto, pcto);
}
snprintf(message, sizeof(message),
"captured by the %s!", to->shipname);
- Writestr(W_SIGNAL, from, message);
+ send_signal(from, message);
snprintf(message, sizeof(message),
"killed in melee: %d. %s: %d",
totalto, from->shipname, totalfrom);
- Writestr(W_SIGNAL, to, message);
+ send_signal(to, message);
mento = 0;
return 0;
}
}
return -1;
}
- Write(W_TURN, SHIP(0), turn, 0, 0, 0);
+ send_turn(turn);
if (turn % 7 == 0 && (dieroll() >= cc->windchange || !windspeed)) {
switch (dieroll()) {
case 1:
}
else
windspeed++;
- Write(W_WIND, SHIP(0), winddir, windspeed, 0, 0);
+ send_wind( winddir, windspeed);
}
return 0;
}