Gain blind-spot vision at perception=nov rather than bgn.

Fix crash when critically hitting a creature with wings/tail.
This commit is contained in:
Rob Pearce 2023-10-11 13:46:11 +11:00
parent ec6a86a0b2
commit 8eb5d2af99
2 changed files with 4 additions and 4 deletions

2
data.c
View File

@ -20950,8 +20950,8 @@ void initskills(void) {
addskilldesc(SK_PERCEPTION, PR_INEPT, "- At higher levels this skill will also let you obscure your own tracks.", B_TRUE);
addskilldesc(SK_PERCEPTION, PR_NOVICE, "^gYou can now see footprints.^n", B_TRUE);
addskilldesc(SK_PERCEPTION, PR_NOVICE, "^gYou can now check for trails on staircases before descending.^n", B_TRUE);
addskilldesc(SK_PERCEPTION, PR_NOVICE, "^gYou now have perception of your blind spots.^n", B_TRUE);
addskilldesc(SK_PERCEPTION, PR_BEGINNER, "^gYou can now determine the depth and direction of footprints.^n", B_TRUE);
addskilldesc(SK_PERCEPTION, PR_BEGINNER, "^gYou now have perception of your blind spots.^n", B_TRUE);
addskilldesc(SK_PERCEPTION, PR_BEGINNER, "^gYou can now recognise the quality of all items.^n", B_TRUE);
addskilldesc(SK_PERCEPTION, PR_ADEPT, "^gYour field of vision is now wider.^n", B_TRUE);
addskilldesc(SK_PERCEPTION, PR_EXPERT, "^gYou can now move without leaving footprints.^n", B_TRUE);

6
lf.c
View File

@ -11279,8 +11279,8 @@ enum BEHAVIOUR getrandombehaviour(void) {
// pick a random major body part
// ie. head, body, arms/hands, legs, wings, tail
enum BODYPART getrandomcorebp(lifeform_t *lf, lifeform_t *attacker) {
int cutoff[4],nparts = 0,i,max = 0,num;
enum BODYPART bp[4],selbp = BP_NONE;
int cutoff[MAXBODYPARTS],nparts = 0,i,max = 0,num;
enum BODYPART bp[MAXBODYPARTS],selbp = BP_NONE;
if (hasbp(lf, BP_BODY)) {
if (attacker && !canreachbp(attacker, lf, BP_BODY)) {
@ -20360,7 +20360,7 @@ void precalclos(lifeform_t *lf) {
get_fov_quad_endpoints(lf, curq, maxvisrange, endx, endy, &nendcells);
}
if (plev >= PR_BEGINNER) {
if (plev >= PR_NOVICE) {
enum TURNDIR turndir;
cell_t *adjcell;
// include cells immediately to the lifeform's left and right.