/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2015, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2020, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure, Markus Armbruster
*
* Empire is free software: you can redistribute it and/or modify
* actofgod.c: Deity meddling subroutines
*
* Known contributors to this file:
- * Markus Armbruster, 2013-2015
+ * Markus Armbruster, 2013-2016
*/
#include <config.h>
#include <stdarg.h>
#include "actofgod.h"
-#include "file.h"
#include "news.h"
#include "optlist.h"
#include "player.h"
}
/*
- * Report deity meddling with sector SP.
+ * Report deity meddling with sector @sp.
* Print a message (always), send a bulletin to the sector owner and
* report news (sometimes).
- * NAME names what is being changed in the sector.
- * If CHANGE is zero, the meddling is a no-op (bulletin suppressed).
- * If CHANGE is negative, it's secret (bulletin suppressed).
- * If a bulletin is sent, report N_AIDS news for positive GOODNESS,
- * N_HURTS news for negative GOODNESS
- * The bulletin's text is like "NAME of sector X,Y changed <how> by an
+ * @name names what is being changed in the sector.
+ * If @change is zero, the meddling is a no-op (bulletin suppressed).
+ * If @change is negative, it's secret (bulletin suppressed).
+ * If a bulletin is sent, report N_AIDS news for positive @goodness,
+ * N_HURTS news for negative @goodness
+ * The bulletin's text is like "@name of sector X,Y changed <how> by an
* act of <deity>, where <deity> is the deity's name, and <how> comes
- * from formatting printf-style FMT with optional arguments.
+ * from formatting printf-style @fmt with optional arguments.
*/
void
divine_sct_change(struct sctstr *sp, char *name,
}
/*
- * Report deity meddling with NP.
+ * Report deity meddling with @np.
* Just like divine_sct_change(), only for nations.
*/
void
}
/*
- * Report deity meddling with UNIT.
+ * Report deity meddling with @unit.
* Just like divine_sct_change(), only for ships, planes, land units,
* nukes.
*/
divine_load_unload(unit, type, uid, "loaded onto");
if (get_empobj(type, uid, &carrier)
&& (unit->x != carrier.gen.x || unit->y != carrier.gen.y)) {
- pr("%s teleported from %s to %s!",
+ pr("%s teleported from %s to %s!\n",
unit_nameof(unit), xyas(unit->x, unit->y, player->cnum),
xyas(carrier.gen.x, carrier.gen.y, player->cnum));
unit_teleport(unit, carrier.gen.x, carrier.gen.y);
return;
}
- symbol_set_fmt(set, sizeof(set), new & ~old, sym, 1);
- symbol_set_fmt(clr, sizeof(clr), old & ~new, sym, 1);
+ symbol_set_fmt(set, sizeof(set), new & ~old, sym, ", ", 1);
+ symbol_set_fmt(clr, sizeof(clr), old & ~new, sym, ", ", 1);
pr("%s of %s changed: %s%s%s%s%s\n",
name, unit_nameof(unit),
set, set[0] ? " set" : "",
set[0] && clr[0] ? ", and " : "",
clr, clr[0] ? " cleared" : "");
- if (symbol_set_fmt(set, sizeof(set), new & ~old, sym, 0)
- + symbol_set_fmt(clr, sizeof(clr), old & ~new, sym, 0))
+ if (symbol_set_fmt(set, sizeof(set), new & ~old, sym, ", ", 0)
+ + symbol_set_fmt(clr, sizeof(clr), old & ~new, sym, ", ", 0))
wu(0, unit->own, "%s of %s changed by an act of %s: %s%s%s%s%s\n",
name, unit_nameof(unit), cname(player->cnum),
set, set[0] ? " set" : "",
}
/*
- * Report deity giving/taking commodities to/from WHOM.
- * Give AMT of IP in PLACE.
+ * Report deity giving/taking commodities to/from @whom.
+ * Give @amt of @ip in @place.
*/
void
report_divine_gift(natid whom, struct ichrstr *ip, int amt, char *place)