Indented with src/scripts/indent-emp.
This commit is contained in:
parent
5f263a7753
commit
9b7adfbecc
437 changed files with 52211 additions and 51052 deletions
|
@ -54,335 +54,328 @@
|
|||
int
|
||||
setsector(void)
|
||||
{
|
||||
struct sctstr sect;
|
||||
s_char *what;
|
||||
int amt,current;
|
||||
s_char *p;
|
||||
struct nstr_sect nstr;
|
||||
s_char buf[1024];
|
||||
s_char char0, char1;
|
||||
struct sctstr sect;
|
||||
s_char *what;
|
||||
int amt, current;
|
||||
s_char *p;
|
||||
struct nstr_sect nstr;
|
||||
s_char buf[1024];
|
||||
s_char char0, char1;
|
||||
|
||||
if ((what = getstarg(player->argp[1],
|
||||
"Give What (iron, gold, oil, uranium, fertility, owner, eff., Mob., Work, Avail., oldown, mines)? ", buf)) == 0)
|
||||
return RET_SYN;
|
||||
char0 = what[0];
|
||||
char1 = what[1];
|
||||
if ((what = getstarg(player->argp[1],
|
||||
"Give What (iron, gold, oil, uranium, fertility, owner, eff., Mob., Work, Avail., oldown, mines)? ",
|
||||
buf)) == 0)
|
||||
return RET_SYN;
|
||||
char0 = what[0];
|
||||
char1 = what[1];
|
||||
|
||||
switch (char0) {
|
||||
case 'i':
|
||||
if (!snxtsct(&nstr, player->argp[2]))
|
||||
return RET_SYN;
|
||||
while (nxtsct(&nstr,§) > 0) {
|
||||
if( !(p = getstarg(player->argp[3], "What value : ", buf)) ||
|
||||
(*p == '\0'))
|
||||
return RET_SYN;
|
||||
amt = atoi(p);
|
||||
current = sect.sct_min;
|
||||
current += amt;
|
||||
if (current < 0)
|
||||
current = 0;
|
||||
if (current > 100)
|
||||
current = 100;
|
||||
if (sect.sct_own != 0)
|
||||
resnoise(§,1,"Iron ore content",
|
||||
(int) sect.sct_min, current);
|
||||
sect.sct_min = (u_char) current;
|
||||
putsect(§);
|
||||
}
|
||||
break;
|
||||
case 'g':
|
||||
if (!snxtsct(&nstr, player->argp[2]))
|
||||
return RET_SYN;
|
||||
while (nxtsct(&nstr,§) > 0) {
|
||||
if( !(p = getstarg(player->argp[3], "What value : ", buf)) ||
|
||||
(*p == '\0'))
|
||||
return RET_SYN;
|
||||
amt = atoi(p);
|
||||
current = sect.sct_gmin;
|
||||
current += amt;
|
||||
if (current < 0)
|
||||
current = 0;
|
||||
if (current > 100)
|
||||
current = 100;
|
||||
if (sect.sct_own != 0)
|
||||
resnoise(§,1,"Gold content",
|
||||
(int) sect.sct_gmin, current);
|
||||
sect.sct_gmin = (u_char) current;
|
||||
putsect(§);
|
||||
}
|
||||
break;
|
||||
case 'o':
|
||||
switch(char1) {
|
||||
case 'i':
|
||||
if (!snxtsct(&nstr, player->argp[2]))
|
||||
return RET_SYN;
|
||||
while (nxtsct(&nstr,§) > 0) {
|
||||
if( !(p = getstarg(player->argp[3], "What value : ", buf)) ||
|
||||
(*p == '\0'))
|
||||
return RET_SYN;
|
||||
amt = atoi(p);
|
||||
current = sect.sct_oil;
|
||||
current += amt;
|
||||
if (current < 0)
|
||||
current = 0;
|
||||
if (current > 100)
|
||||
current = 100;
|
||||
if (sect.sct_own != 0)
|
||||
resnoise(§,1,"Oil content",
|
||||
(int) sect.sct_oil, current);
|
||||
sect.sct_oil = (u_char) current;
|
||||
putsect(§);
|
||||
}
|
||||
break;
|
||||
case 'w':
|
||||
if (!snxtsct(&nstr, player->argp[2]))
|
||||
return RET_SYN;
|
||||
while (nxtsct(&nstr,§) > 0) {
|
||||
if( !(p = getstarg(player->argp[3], "What value : ", buf)) ||
|
||||
(*p == '\0'))
|
||||
return RET_SYN;
|
||||
amt = atoi(p);
|
||||
if ((amt < 0) || (amt > MAXNOC-1))
|
||||
return RET_SYN;
|
||||
pr("Owner of %s changed from %s (#%d) to %s (#%d).\n",
|
||||
xyas(sect.sct_x, sect.sct_y, player->cnum),
|
||||
cname(sect.sct_own),
|
||||
sect.sct_own, cname(amt), amt);
|
||||
if (sect.sct_own) {
|
||||
wu(player->cnum, sect.sct_own,
|
||||
"Sector %s lost to deity intervention\n",
|
||||
xyas(sect.sct_x, sect.sct_y,
|
||||
sect.sct_own));
|
||||
}
|
||||
if (amt)
|
||||
wu(player->cnum, amt,
|
||||
"Sector %s gained from deity intervention\n",
|
||||
xyas(sect.sct_x, sect.sct_y,
|
||||
amt));
|
||||
makelost(EF_SECTOR, sect.sct_own, 0, sect.sct_x, sect.sct_y);
|
||||
makenotlost(EF_SECTOR, amt, 0, sect.sct_x, sect.sct_y);
|
||||
|
||||
sect.sct_own = (natid) amt;
|
||||
putsect(§);
|
||||
}
|
||||
break;
|
||||
case 'l':
|
||||
if (!snxtsct(&nstr, player->argp[2]))
|
||||
return RET_SYN;
|
||||
while (nxtsct(&nstr,§) > 0) {
|
||||
if( !(p = getstarg(player->argp[3], "What value : ", buf)) ||
|
||||
(*p == '\0'))
|
||||
return RET_SYN;
|
||||
amt = atoi(p);
|
||||
if ((amt < 0) || (amt > MAXNOC-1))
|
||||
return RET_SYN;
|
||||
pr("Old owner of %s changed from %s (#%d) to %s (#%d).\n",
|
||||
xyas(sect.sct_x, sect.sct_y, player->cnum),
|
||||
cname(sect.sct_oldown),
|
||||
sect.sct_oldown, cname(amt), amt);
|
||||
sect.sct_oldown = (natid) amt;
|
||||
putsect(§);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
pr("huh?\n");
|
||||
return RET_SYN;
|
||||
}
|
||||
break;
|
||||
case 'e':
|
||||
if (!snxtsct(&nstr, player->argp[2]))
|
||||
return RET_SYN;
|
||||
while (nxtsct(&nstr,§) > 0) {
|
||||
if( !(p = getstarg(player->argp[3], "What value : ", buf)) ||
|
||||
(*p == '\0'))
|
||||
return RET_SYN;
|
||||
amt = atoi(p);
|
||||
current = sect.sct_effic;
|
||||
current += amt;
|
||||
if (current < 0)
|
||||
current = 0;
|
||||
if (current > 100)
|
||||
current = 100;
|
||||
pr("Efficiency in %s changed to %d.\n",
|
||||
xyas(sect.sct_x, sect.sct_y, player->cnum),
|
||||
current);
|
||||
sect.sct_effic = (u_char) current;
|
||||
putsect(§);
|
||||
}
|
||||
break;
|
||||
case 'm':
|
||||
switch(char1) {
|
||||
case 'i':
|
||||
if (!snxtsct(&nstr, player->argp[2]))
|
||||
return RET_SYN;
|
||||
while (nxtsct(&nstr,§) > 0) {
|
||||
int mines;
|
||||
|
||||
if(!(p = getstarg(player->argp[3], "What value : ", buf)) ||
|
||||
(*p == '\0'))
|
||||
return RET_SYN;
|
||||
amt = atoi(p);
|
||||
mines=getvar(V_MINE, (s_char *)§,EF_SECTOR);
|
||||
current = mines;
|
||||
current += amt;
|
||||
if (current < 0)
|
||||
current = 0;
|
||||
if (sect.sct_own != 0)
|
||||
resnoise(§,1,"Mines",
|
||||
(int) mines, current);
|
||||
putvar(V_MINE,current,(s_char *)§,
|
||||
EF_SECTOR);
|
||||
putsect(§);
|
||||
}
|
||||
break;
|
||||
case 'o':
|
||||
if (!snxtsct(&nstr, player->argp[2]))
|
||||
return RET_SYN;
|
||||
while (nxtsct(&nstr,§) > 0) {
|
||||
if(!(p = getstarg(player->argp[3],"What value : ",buf)) ||
|
||||
(*p == '\0'))
|
||||
return RET_SYN;
|
||||
amt = atoi(p);
|
||||
current = sect.sct_mobil;
|
||||
current += amt;
|
||||
if (current < -127)
|
||||
current = -127;
|
||||
if (current > 127)
|
||||
current = 127;
|
||||
pr("Mobility in %s changed to %d.\n",
|
||||
xyas(sect.sct_x, sect.sct_y, player->cnum),
|
||||
current);
|
||||
sect.sct_mobil = (short) current;
|
||||
putsect(§);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
pr("huh?\n");
|
||||
return RET_SYN;
|
||||
}
|
||||
break;
|
||||
case 'a':
|
||||
if (!snxtsct(&nstr, player->argp[2]))
|
||||
return RET_SYN;
|
||||
while (nxtsct(&nstr,§) > 0) {
|
||||
if( !(p = getstarg(player->argp[3], "What value : ", buf)) ||
|
||||
(*p == '\0'))
|
||||
return RET_SYN;
|
||||
amt = atoi(p);
|
||||
current = sect.sct_avail;
|
||||
current += amt;
|
||||
if (current < 0)
|
||||
current = 0;
|
||||
if (current > 9999)
|
||||
current = 9999;
|
||||
pr("Available in %s changed to %d.\n",
|
||||
xyas(sect.sct_x, sect.sct_y, player->cnum),
|
||||
current);
|
||||
sect.sct_avail = (short) current;
|
||||
putsect(§);
|
||||
}
|
||||
break;
|
||||
case 'w':
|
||||
if (!snxtsct(&nstr, player->argp[2]))
|
||||
return RET_SYN;
|
||||
while (nxtsct(&nstr,§) > 0) {
|
||||
if( !(p = getstarg(player->argp[3], "What value : ", buf)) ||
|
||||
(*p == '\0'))
|
||||
return RET_SYN;
|
||||
amt = atoi(p);
|
||||
current = sect.sct_work;
|
||||
current += amt;
|
||||
if (current < 0)
|
||||
current = 0;
|
||||
if (current > 100)
|
||||
current = 100;
|
||||
pr("Work in %s changed to %d.\n",
|
||||
xyas(sect.sct_x, sect.sct_y, player->cnum),
|
||||
current);
|
||||
sect.sct_work = (u_char) current;
|
||||
putsect(§);
|
||||
}
|
||||
break;
|
||||
case 'f':
|
||||
if (!snxtsct(&nstr, player->argp[2]))
|
||||
return RET_SYN;
|
||||
while (nxtsct(&nstr,§) > 0) {
|
||||
if( !(p = getstarg(player->argp[3], "What value : ", buf)) ||
|
||||
(*p == '\0'))
|
||||
return RET_SYN;
|
||||
amt = atoi(p);
|
||||
current = sect.sct_fertil;
|
||||
current += amt;
|
||||
if (current < 0)
|
||||
current = 0;
|
||||
if (current > 120)
|
||||
current = 120;
|
||||
if (sect.sct_own != 0)
|
||||
resnoise(§,1,"Fertility content",
|
||||
(int) sect.sct_fertil, current);
|
||||
sect.sct_fertil = (u_char) current;
|
||||
putsect(§);
|
||||
}
|
||||
break;
|
||||
case 'u':
|
||||
if (!snxtsct(&nstr, player->argp[2]))
|
||||
return RET_SYN;
|
||||
while (nxtsct(&nstr,§) > 0) {
|
||||
if( !(p = getstarg(player->argp[3], "What value : ", buf)) ||
|
||||
(*p == '\0'))
|
||||
return RET_SYN;
|
||||
amt = atoi(p);
|
||||
current = sect.sct_uran;
|
||||
current += amt;
|
||||
if (current < 0)
|
||||
current = 0;
|
||||
if (current > 100)
|
||||
current = 100;
|
||||
if (sect.sct_own != 0)
|
||||
resnoise(§,1,"Uranium content",
|
||||
(int) sect.sct_uran, current);
|
||||
sect.sct_uran = (u_char) current;
|
||||
putsect(§);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
pr("huh?\n");
|
||||
switch (char0) {
|
||||
case 'i':
|
||||
if (!snxtsct(&nstr, player->argp[2]))
|
||||
return RET_SYN;
|
||||
while (nxtsct(&nstr, §) > 0) {
|
||||
if (!(p = getstarg(player->argp[3], "What value : ", buf)) ||
|
||||
(*p == '\0'))
|
||||
return RET_SYN;
|
||||
amt = atoi(p);
|
||||
current = sect.sct_min;
|
||||
current += amt;
|
||||
if (current < 0)
|
||||
current = 0;
|
||||
if (current > 100)
|
||||
current = 100;
|
||||
if (sect.sct_own != 0)
|
||||
resnoise(§, 1, "Iron ore content",
|
||||
(int)sect.sct_min, current);
|
||||
sect.sct_min = (u_char)current;
|
||||
putsect(§);
|
||||
}
|
||||
return RET_OK;
|
||||
break;
|
||||
case 'g':
|
||||
if (!snxtsct(&nstr, player->argp[2]))
|
||||
return RET_SYN;
|
||||
while (nxtsct(&nstr, §) > 0) {
|
||||
if (!(p = getstarg(player->argp[3], "What value : ", buf)) ||
|
||||
(*p == '\0'))
|
||||
return RET_SYN;
|
||||
amt = atoi(p);
|
||||
current = sect.sct_gmin;
|
||||
current += amt;
|
||||
if (current < 0)
|
||||
current = 0;
|
||||
if (current > 100)
|
||||
current = 100;
|
||||
if (sect.sct_own != 0)
|
||||
resnoise(§, 1, "Gold content",
|
||||
(int)sect.sct_gmin, current);
|
||||
sect.sct_gmin = (u_char)current;
|
||||
putsect(§);
|
||||
}
|
||||
break;
|
||||
case 'o':
|
||||
switch (char1) {
|
||||
case 'i':
|
||||
if (!snxtsct(&nstr, player->argp[2]))
|
||||
return RET_SYN;
|
||||
while (nxtsct(&nstr, §) > 0) {
|
||||
if (!(p = getstarg(player->argp[3], "What value : ", buf))
|
||||
|| (*p == '\0'))
|
||||
return RET_SYN;
|
||||
amt = atoi(p);
|
||||
current = sect.sct_oil;
|
||||
current += amt;
|
||||
if (current < 0)
|
||||
current = 0;
|
||||
if (current > 100)
|
||||
current = 100;
|
||||
if (sect.sct_own != 0)
|
||||
resnoise(§, 1, "Oil content",
|
||||
(int)sect.sct_oil, current);
|
||||
sect.sct_oil = (u_char)current;
|
||||
putsect(§);
|
||||
}
|
||||
break;
|
||||
case 'w':
|
||||
if (!snxtsct(&nstr, player->argp[2]))
|
||||
return RET_SYN;
|
||||
while (nxtsct(&nstr, §) > 0) {
|
||||
if (!(p = getstarg(player->argp[3], "What value : ", buf))
|
||||
|| (*p == '\0'))
|
||||
return RET_SYN;
|
||||
amt = atoi(p);
|
||||
if ((amt < 0) || (amt > MAXNOC - 1))
|
||||
return RET_SYN;
|
||||
pr("Owner of %s changed from %s (#%d) to %s (#%d).\n",
|
||||
xyas(sect.sct_x, sect.sct_y, player->cnum),
|
||||
cname(sect.sct_own), sect.sct_own, cname(amt), amt);
|
||||
if (sect.sct_own) {
|
||||
wu(player->cnum, sect.sct_own,
|
||||
"Sector %s lost to deity intervention\n",
|
||||
xyas(sect.sct_x, sect.sct_y, sect.sct_own));
|
||||
}
|
||||
if (amt)
|
||||
wu(player->cnum, amt,
|
||||
"Sector %s gained from deity intervention\n",
|
||||
xyas(sect.sct_x, sect.sct_y, amt));
|
||||
makelost(EF_SECTOR, sect.sct_own, 0, sect.sct_x,
|
||||
sect.sct_y);
|
||||
makenotlost(EF_SECTOR, amt, 0, sect.sct_x, sect.sct_y);
|
||||
|
||||
sect.sct_own = (natid)amt;
|
||||
putsect(§);
|
||||
}
|
||||
break;
|
||||
case 'l':
|
||||
if (!snxtsct(&nstr, player->argp[2]))
|
||||
return RET_SYN;
|
||||
while (nxtsct(&nstr, §) > 0) {
|
||||
if (!(p = getstarg(player->argp[3], "What value : ", buf))
|
||||
|| (*p == '\0'))
|
||||
return RET_SYN;
|
||||
amt = atoi(p);
|
||||
if ((amt < 0) || (amt > MAXNOC - 1))
|
||||
return RET_SYN;
|
||||
pr("Old owner of %s changed from %s (#%d) to %s (#%d).\n",
|
||||
xyas(sect.sct_x, sect.sct_y, player->cnum),
|
||||
cname(sect.sct_oldown),
|
||||
sect.sct_oldown, cname(amt), amt);
|
||||
sect.sct_oldown = (natid)amt;
|
||||
putsect(§);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
pr("huh?\n");
|
||||
return RET_SYN;
|
||||
}
|
||||
break;
|
||||
case 'e':
|
||||
if (!snxtsct(&nstr, player->argp[2]))
|
||||
return RET_SYN;
|
||||
while (nxtsct(&nstr, §) > 0) {
|
||||
if (!(p = getstarg(player->argp[3], "What value : ", buf)) ||
|
||||
(*p == '\0'))
|
||||
return RET_SYN;
|
||||
amt = atoi(p);
|
||||
current = sect.sct_effic;
|
||||
current += amt;
|
||||
if (current < 0)
|
||||
current = 0;
|
||||
if (current > 100)
|
||||
current = 100;
|
||||
pr("Efficiency in %s changed to %d.\n",
|
||||
xyas(sect.sct_x, sect.sct_y, player->cnum), current);
|
||||
sect.sct_effic = (u_char)current;
|
||||
putsect(§);
|
||||
}
|
||||
break;
|
||||
case 'm':
|
||||
switch (char1) {
|
||||
case 'i':
|
||||
if (!snxtsct(&nstr, player->argp[2]))
|
||||
return RET_SYN;
|
||||
while (nxtsct(&nstr, §) > 0) {
|
||||
int mines;
|
||||
|
||||
if (!(p = getstarg(player->argp[3], "What value : ", buf))
|
||||
|| (*p == '\0'))
|
||||
return RET_SYN;
|
||||
amt = atoi(p);
|
||||
mines = getvar(V_MINE, (s_char *)§, EF_SECTOR);
|
||||
current = mines;
|
||||
current += amt;
|
||||
if (current < 0)
|
||||
current = 0;
|
||||
if (sect.sct_own != 0)
|
||||
resnoise(§, 1, "Mines", (int)mines, current);
|
||||
putvar(V_MINE, current, (s_char *)§, EF_SECTOR);
|
||||
putsect(§);
|
||||
}
|
||||
break;
|
||||
case 'o':
|
||||
if (!snxtsct(&nstr, player->argp[2]))
|
||||
return RET_SYN;
|
||||
while (nxtsct(&nstr, §) > 0) {
|
||||
if (!(p = getstarg(player->argp[3], "What value : ", buf))
|
||||
|| (*p == '\0'))
|
||||
return RET_SYN;
|
||||
amt = atoi(p);
|
||||
current = sect.sct_mobil;
|
||||
current += amt;
|
||||
if (current < -127)
|
||||
current = -127;
|
||||
if (current > 127)
|
||||
current = 127;
|
||||
pr("Mobility in %s changed to %d.\n",
|
||||
xyas(sect.sct_x, sect.sct_y, player->cnum), current);
|
||||
sect.sct_mobil = (short)current;
|
||||
putsect(§);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
pr("huh?\n");
|
||||
return RET_SYN;
|
||||
}
|
||||
break;
|
||||
case 'a':
|
||||
if (!snxtsct(&nstr, player->argp[2]))
|
||||
return RET_SYN;
|
||||
while (nxtsct(&nstr, §) > 0) {
|
||||
if (!(p = getstarg(player->argp[3], "What value : ", buf)) ||
|
||||
(*p == '\0'))
|
||||
return RET_SYN;
|
||||
amt = atoi(p);
|
||||
current = sect.sct_avail;
|
||||
current += amt;
|
||||
if (current < 0)
|
||||
current = 0;
|
||||
if (current > 9999)
|
||||
current = 9999;
|
||||
pr("Available in %s changed to %d.\n",
|
||||
xyas(sect.sct_x, sect.sct_y, player->cnum), current);
|
||||
sect.sct_avail = (short)current;
|
||||
putsect(§);
|
||||
}
|
||||
break;
|
||||
case 'w':
|
||||
if (!snxtsct(&nstr, player->argp[2]))
|
||||
return RET_SYN;
|
||||
while (nxtsct(&nstr, §) > 0) {
|
||||
if (!(p = getstarg(player->argp[3], "What value : ", buf)) ||
|
||||
(*p == '\0'))
|
||||
return RET_SYN;
|
||||
amt = atoi(p);
|
||||
current = sect.sct_work;
|
||||
current += amt;
|
||||
if (current < 0)
|
||||
current = 0;
|
||||
if (current > 100)
|
||||
current = 100;
|
||||
pr("Work in %s changed to %d.\n",
|
||||
xyas(sect.sct_x, sect.sct_y, player->cnum), current);
|
||||
sect.sct_work = (u_char)current;
|
||||
putsect(§);
|
||||
}
|
||||
break;
|
||||
case 'f':
|
||||
if (!snxtsct(&nstr, player->argp[2]))
|
||||
return RET_SYN;
|
||||
while (nxtsct(&nstr, §) > 0) {
|
||||
if (!(p = getstarg(player->argp[3], "What value : ", buf)) ||
|
||||
(*p == '\0'))
|
||||
return RET_SYN;
|
||||
amt = atoi(p);
|
||||
current = sect.sct_fertil;
|
||||
current += amt;
|
||||
if (current < 0)
|
||||
current = 0;
|
||||
if (current > 120)
|
||||
current = 120;
|
||||
if (sect.sct_own != 0)
|
||||
resnoise(§, 1, "Fertility content",
|
||||
(int)sect.sct_fertil, current);
|
||||
sect.sct_fertil = (u_char)current;
|
||||
putsect(§);
|
||||
}
|
||||
break;
|
||||
case 'u':
|
||||
if (!snxtsct(&nstr, player->argp[2]))
|
||||
return RET_SYN;
|
||||
while (nxtsct(&nstr, §) > 0) {
|
||||
if (!(p = getstarg(player->argp[3], "What value : ", buf)) ||
|
||||
(*p == '\0'))
|
||||
return RET_SYN;
|
||||
amt = atoi(p);
|
||||
current = sect.sct_uran;
|
||||
current += amt;
|
||||
if (current < 0)
|
||||
current = 0;
|
||||
if (current > 100)
|
||||
current = 100;
|
||||
if (sect.sct_own != 0)
|
||||
resnoise(§, 1, "Uranium content",
|
||||
(int)sect.sct_uran, current);
|
||||
sect.sct_uran = (u_char)current;
|
||||
putsect(§);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
pr("huh?\n");
|
||||
return RET_SYN;
|
||||
}
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
static void
|
||||
resbenefit(natid who, int good)
|
||||
{
|
||||
if (!opt_GODNEWS)
|
||||
return;
|
||||
if (!opt_GODNEWS)
|
||||
return;
|
||||
|
||||
if (good) {
|
||||
if (who)
|
||||
nreport(player->cnum, N_AIDS, who, 1);
|
||||
} else {
|
||||
if (who)
|
||||
nreport(player->cnum, N_HURTS, who, 1);
|
||||
}
|
||||
if (good) {
|
||||
if (who)
|
||||
nreport(player->cnum, N_AIDS, who, 1);
|
||||
} else {
|
||||
if (who)
|
||||
nreport(player->cnum, N_HURTS, who, 1);
|
||||
}
|
||||
}
|
||||
|
||||
extern void
|
||||
resnoise(struct sctstr *sptr, int public_amt, s_char *name, int old, int new)
|
||||
resnoise(struct sctstr *sptr, int public_amt, s_char *name, int old,
|
||||
int new)
|
||||
{
|
||||
s_char p[100];
|
||||
s_char p[100];
|
||||
|
||||
pr("%s of %s changed from %d to %d%%\n",
|
||||
name, xyas(sptr->sct_x, sptr->sct_y, player->cnum), old, new);
|
||||
if (public_amt)
|
||||
(void) sprintf(p, "changed from %d to %d", old, new);
|
||||
else
|
||||
(void) sprintf(p, "%s", old<new ? "increased":"decreased");
|
||||
if (sptr->sct_own)
|
||||
wu(0, sptr->sct_own,
|
||||
"%s in %s was %s by an act of %s\n",
|
||||
name, xyas(sptr->sct_x, sptr->sct_y, sptr->sct_own),
|
||||
p, cname(player->cnum));
|
||||
resbenefit(sptr->sct_own, (old < new));
|
||||
pr("%s of %s changed from %d to %d%%\n",
|
||||
name, xyas(sptr->sct_x, sptr->sct_y, player->cnum), old, new);
|
||||
if (public_amt)
|
||||
(void)sprintf(p, "changed from %d to %d", old, new);
|
||||
else
|
||||
(void)sprintf(p, "%s", old < new ? "increased" : "decreased");
|
||||
if (sptr->sct_own)
|
||||
wu(0, sptr->sct_own,
|
||||
"%s in %s was %s by an act of %s\n",
|
||||
name, xyas(sptr->sct_x, sptr->sct_y, sptr->sct_own),
|
||||
p, cname(player->cnum));
|
||||
resbenefit(sptr->sct_own, (old < new));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue