- Safety googles (and anything tinted) will protect you from being blinded by bright lights.
This commit is contained in:
parent
7706dd8360
commit
23e50d1cf2
1
data.c
1
data.c
|
@ -8418,6 +8418,7 @@ void initobjects(void) {
|
||||||
addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_COMMON, NULL);
|
addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_COMMON, NULL);
|
||||||
addflag(lastot->flags, F_GOESON, BP_EYES, NA, NA, NULL);
|
addflag(lastot->flags, F_GOESON, BP_EYES, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_OBHP, 20, 20, NA, NULL);
|
addflag(lastot->flags, F_OBHP, 20, 20, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_TINTED, B_TRUE, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_NOQUALITY, B_TRUE, NA, NA, NULL);
|
addflag(lastot->flags, F_NOQUALITY, B_TRUE, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_CRITPROTECTION, 100, NA, NA, NULL);
|
addflag(lastot->flags, F_CRITPROTECTION, 100, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
|
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
|
||||||
|
|
22
lf.c
22
lf.c
|
@ -13917,14 +13917,22 @@ int lfproduceslight(lifeform_t *lf, object_t **fromwhat) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int lighthurtseyes(lifeform_t *lf) {
|
int lighthurtseyes(lifeform_t *lf) {
|
||||||
// note: if you don't have eyes, your'e safe!
|
flag_t *f;
|
||||||
if (!isblind(lf) && !lfhasflagval(lf, F_NOBODYPART, BP_EYES, NA, NA, NULL)) {
|
|
||||||
flag_t *f;
|
if (eyesshaded(lf)) return B_FALSE;
|
||||||
f = lfhasflag(lf, F_SEEINDARK);
|
|
||||||
if (f && (f->val[1] == B_BLINDABLE)) {
|
if (isblind(lf)) return B_FALSE;
|
||||||
return B_TRUE;
|
|
||||||
}
|
// if you don't have eyes, your'e safe!
|
||||||
|
if (lfhasflagval(lf, F_NOBODYPART, BP_EYES, NA, NA, NULL)) {
|
||||||
|
return B_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
f = lfhasflag(lf, F_SEEINDARK);
|
||||||
|
if (f && (f->val[1] == B_BLINDABLE)) {
|
||||||
|
return B_TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
return B_FALSE;
|
return B_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue