couple of reformatting bits
Some reformatting done while working on ATTRMAX().
This commit is contained in:
+6
-5
@@ -308,11 +308,12 @@ poisontell(int typ, /* which attribute */
|
|||||||
|
|
||||||
/* called when an attack or trap has poisoned hero (used to be in mon.c) */
|
/* called when an attack or trap has poisoned hero (used to be in mon.c) */
|
||||||
void
|
void
|
||||||
poisoned(const char *reason, /* controls what messages we display */
|
poisoned(
|
||||||
int typ,
|
const char *reason, /* controls what messages we display */
|
||||||
const char *pkiller, /* for score+log file if fatal */
|
int typ,
|
||||||
int fatal, /* if fatal is 0, limit damage to adjattrib */
|
const char *pkiller, /* for score+log file if fatal */
|
||||||
boolean thrown_weapon) /* thrown weapons are less deadly */
|
int fatal, /* if fatal is 0, limit damage to adjattrib */
|
||||||
|
boolean thrown_weapon) /* thrown weapons are less deadly */
|
||||||
{
|
{
|
||||||
int i, loss, kprefix = KILLED_BY_AN;
|
int i, loss, kprefix = KILLED_BY_AN;
|
||||||
boolean blast = !strcmp(reason, "blast");
|
boolean blast = !strcmp(reason, "blast");
|
||||||
|
|||||||
+5
-3
@@ -260,14 +260,16 @@ cause_known(
|
|||||||
|
|
||||||
/* format a characteristic value, accommodating Strength's strangeness */
|
/* format a characteristic value, accommodating Strength's strangeness */
|
||||||
static char *
|
static char *
|
||||||
attrval(int attrindx, int attrvalue,
|
attrval(
|
||||||
char resultbuf[]) /* should be at least [7] to hold "18/100\0" */
|
int attrindx,
|
||||||
|
int attrvalue,
|
||||||
|
char resultbuf[]) /* should be at least [7] to hold "18/100\0" */
|
||||||
{
|
{
|
||||||
if (attrindx != A_STR || attrvalue <= 18)
|
if (attrindx != A_STR || attrvalue <= 18)
|
||||||
Sprintf(resultbuf, "%d", attrvalue);
|
Sprintf(resultbuf, "%d", attrvalue);
|
||||||
else if (attrvalue > STR18(100)) /* 19 to 25 */
|
else if (attrvalue > STR18(100)) /* 19 to 25 */
|
||||||
Sprintf(resultbuf, "%d", attrvalue - 100);
|
Sprintf(resultbuf, "%d", attrvalue - 100);
|
||||||
else /* simplify "18/ **" to be "18/100" */
|
else /* simplify "18/\**" to be "18/100" */
|
||||||
Sprintf(resultbuf, "18/%02d", attrvalue - 18);
|
Sprintf(resultbuf, "18/%02d", attrvalue - 18);
|
||||||
return resultbuf;
|
return resultbuf;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user