* [+] bug: Hunger: [********..ve]
- [+] debugging assertion broke loading a game (loading obs into dummycell with no "->where"). fixed.
This commit is contained in:
parent
273ed162d1
commit
c8a42323d2
BIN
data/hiscores.db
BIN
data/hiscores.db
Binary file not shown.
1
defs.h
1
defs.h
|
@ -2479,6 +2479,7 @@ enum INJURY {
|
|||
IJ_LEGBLEED,
|
||||
IJ_LEGBROKEN,
|
||||
IJ_LEGBRUISE,
|
||||
IJ_NOSEBROKEN,
|
||||
IJ_RIBCRACKED,
|
||||
IJ_SHOULDERDISLOCATED,
|
||||
IJ_TENDONCUT,
|
||||
|
|
5
io.c
5
io.c
|
@ -1252,7 +1252,7 @@ int announceflaggain(lifeform_t *lf, flag_t *f) {
|
|||
if (isplayer(lf)) {
|
||||
msg("^WYou feel woozy...");
|
||||
} else {
|
||||
msg("^%c%s looks woozy...", lfname, getlfcol(lf, CC_BAD));
|
||||
msg("^%c%s looks woozy...", getlfcol(lf, CC_BAD), lfname);
|
||||
}
|
||||
donesomething = B_TRUE;
|
||||
break;
|
||||
|
@ -8432,7 +8432,7 @@ void showlfstats(lifeform_t *lf, int showall) {
|
|||
f = hasflag(lf->flags, F_HUNGER);
|
||||
if (f) {
|
||||
int i;
|
||||
char hungerbar[10];
|
||||
char hungerbar[11];
|
||||
float pct;
|
||||
enum COLOUR col;
|
||||
doheadingsmall(mainwin, y2, x2, ftext, "Hunger");
|
||||
|
@ -8451,6 +8451,7 @@ void showlfstats(lifeform_t *lf, int showall) {
|
|||
hungerbar[i] = '.';
|
||||
}
|
||||
}
|
||||
hungerbar[10] = '\0';
|
||||
|
||||
//gethungername(lf, gethungerlevel(f->val[0]), buf);
|
||||
capitalise(buf);
|
||||
|
|
32
lf.c
32
lf.c
|
@ -4496,10 +4496,14 @@ int real_getattr(lifeform_t *lf, enum ATTRIB attr, int ignoreattrset) {
|
|||
val -= f->val[0];
|
||||
}
|
||||
}
|
||||
if ((f->id == F_INJURY) && (f->val[0] == IJ_WINDPIPECRUSHED) && (attr == A_CON)) {
|
||||
if (f->id == F_INJURY) {
|
||||
if ((f->val[0] == IJ_NOSEBROKEN) && (attr == A_CHA)) {
|
||||
val -= 4;
|
||||
} else if ((f->val[0] == IJ_WINDPIPECRUSHED) && (attr == A_CON)) {
|
||||
val -= 6;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (val < 0) val = 0;
|
||||
|
||||
|
@ -7669,7 +7673,7 @@ int injure(lifeform_t *lf, enum BODYPART where, enum DAMTYPE damtype) {
|
|||
}
|
||||
break;
|
||||
case BP_HEAD:
|
||||
switch (rnd(1,3)) {
|
||||
switch (rnd(1,4)) {
|
||||
case 1:
|
||||
if (!eyesshaded(lf)) {
|
||||
inj = IJ_BLACKEYE;
|
||||
|
@ -7684,6 +7688,10 @@ int injure(lifeform_t *lf, enum BODYPART where, enum DAMTYPE damtype) {
|
|||
inj = IJ_WINDPIPECRUSHED;
|
||||
desc = strdup("windpipe is crushed^fitness penalty, cannot sprint");
|
||||
break;
|
||||
case 4:
|
||||
inj = IJ_NOSEBROKEN;
|
||||
desc = strdup("nose is broken^charisma penalty");
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case BP_LEGS:
|
||||
|
@ -8685,6 +8693,7 @@ void initjobs(void) {
|
|||
addflag(lastjob->flags, F_STARTSKILL, SK_STEALTH, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_UNARMED, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_SS_MENTAL, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_STAVES, PR_NOVICE, NA, NULL);
|
||||
// learnable skills
|
||||
addflag(lastjob->flags, F_CANLEARN, SK_CLIMBING, NA, NA, NULL);
|
||||
addflag(lastjob->flags, F_CANLEARN, SK_COOKING, NA, NA, NULL);
|
||||
|
@ -14194,14 +14203,16 @@ int noise(cell_t *c, lifeform_t *noisemaker, enum NOISECLASS nt, int volume, cha
|
|||
int dir;
|
||||
|
||||
real_getlfnamea(noisemaker, lfname, B_FALSE);
|
||||
if (dist >= 20) {
|
||||
if (dist >= 20) { // 20+
|
||||
strcpy(distbuf, " far away");
|
||||
} else if (dist >= 10) {
|
||||
} else if (dist >= 10) { // 10 - 19
|
||||
strcpy(distbuf, "");
|
||||
} else if (dist >= 5) {
|
||||
} else if (dist >= 5) { // 5 - 9
|
||||
strcpy(distbuf, " nearby");
|
||||
} else {
|
||||
} else if (dist >= 2) { // 2 - 4
|
||||
strcpy(distbuf, " very nearby");
|
||||
} else { // 1
|
||||
strcpy(distbuf, " right beside you");
|
||||
}
|
||||
|
||||
dir = getdirtowards(l->cell, c, NULL, B_FALSE, DT_COMPASS);
|
||||
|
@ -14301,8 +14312,8 @@ int noise(cell_t *c, lifeform_t *noisemaker, enum NOISECLASS nt, int volume, cha
|
|||
flag_t *f;
|
||||
int willrespond = B_FALSE;
|
||||
f = aihastarget(l);
|
||||
if (f && (f->id == F_TARGETLF)) {
|
||||
// might ignore the sound...
|
||||
if (f) {
|
||||
// will probably ignore the sound...
|
||||
if ((volume >= 5) && onein(2)) {
|
||||
willrespond = B_TRUE;
|
||||
}
|
||||
|
@ -18619,7 +18630,10 @@ int rest(lifeform_t *lf, int onpurpose) {
|
|||
msg("%s finishes resting.",lfname);
|
||||
}
|
||||
if (isplayer(lf)) statdirty = B_TRUE;
|
||||
killflag(rf);
|
||||
|
||||
killflagsofid(lf->flags, F_TRAINING);
|
||||
rf = isresting(lf);
|
||||
if (rf) killflag(rf);
|
||||
wantclearmsg = B_FALSE;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue