Lower level of Perception needed to widen FOV.
Make monsters stay unconsciousness for longer. Make loseconsciousness() time actually work. Merciful fighting now works more reliably (and is shown in the status bar)
This commit is contained in:
parent
8eb5d2af99
commit
0e8a26c2b7
4
data.c
4
data.c
|
@ -20952,8 +20952,8 @@ void initskills(void) {
|
||||||
addskilldesc(SK_PERCEPTION, PR_NOVICE, "^gYou can now check for trails on staircases before descending.^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_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 can now determine the depth and direction of footprints.^n", B_TRUE);
|
||||||
addskilldesc(SK_PERCEPTION, PR_BEGINNER, "^gYou can now recognise the quality of all items.^n", B_TRUE);
|
addskilldesc(SK_PERCEPTION, PR_BEGINNER, "^gYour field of vision is now wider.^n", B_TRUE);
|
||||||
addskilldesc(SK_PERCEPTION, PR_ADEPT, "^gYour field of vision is now wider.^n", B_TRUE);
|
addskilldesc(SK_PERCEPTION, PR_ADEPT, "^gYou can now recognise the quality of all items.^n", B_TRUE);
|
||||||
addskilldesc(SK_PERCEPTION, PR_EXPERT, "^gYou can now move without leaving footprints.^n", B_TRUE);
|
addskilldesc(SK_PERCEPTION, PR_EXPERT, "^gYou can now move without leaving footprints.^n", B_TRUE);
|
||||||
addskilldesc(SK_PERCEPTION, PR_MASTER, "^gYou field of vision now extends behind you.^n", B_TRUE);
|
addskilldesc(SK_PERCEPTION, PR_MASTER, "^gYou field of vision now extends behind you.^n", B_TRUE);
|
||||||
addskill(SK_STEALTH, "Stealth", "Affects your ability to move silently.", 0); // untrainable?
|
addskill(SK_STEALTH, "Stealth", "Affects your ability to move silently.", 0); // untrainable?
|
||||||
|
|
9
io.c
9
io.c
|
@ -4935,7 +4935,7 @@ void docommslf(lifeform_t *lf, char ch, lifeform_t *lf2, cell_t *targc) {
|
||||||
sayphrase(lf, SP_MERCYACCEPT, SV_TALK, NA, player->race->name, player);
|
sayphrase(lf, SP_MERCYACCEPT, SV_TALK, NA, player->race->name, player);
|
||||||
// they knock you out
|
// they knock you out
|
||||||
msg("^%d*WHACK*^n", C_YELLOW);
|
msg("^%d*WHACK*^n", C_YELLOW);
|
||||||
fallasleep(player, ST_KO, rnd(50,100));
|
loseconsciousness(player, getkotime(player),lf);
|
||||||
// they take all your stuff
|
// they take all your stuff
|
||||||
/*
|
/*
|
||||||
for (o = player->pack->first ; o ; o = nexto) {
|
for (o = player->pack->first ; o ; o = nexto) {
|
||||||
|
@ -7059,7 +7059,7 @@ char *makedesc_ob(object_t *o, char *retbuf) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// item value
|
// item value
|
||||||
if (getskill(player, SK_PERCEPTION) >= PR_EXPERT) {
|
if (getskill(player, SK_PERCEPTION) >= PR_ADEPT) {
|
||||||
showvalue = B_TRUE;
|
showvalue = B_TRUE;
|
||||||
}
|
}
|
||||||
if (!showvalue) {
|
if (!showvalue) {
|
||||||
|
@ -11941,6 +11941,11 @@ void drawstatus(void) {
|
||||||
unsetcol(statwin, C_LIGHTBLUE);
|
unsetcol(statwin, C_LIGHTBLUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (lfhasflag(player, F_STRIKETOKO)) {
|
||||||
|
setcol(statwin, C_ORANGE);
|
||||||
|
wprintw(statwin, " Mercy");
|
||||||
|
unsetcol(statwin, C_RED);
|
||||||
|
}
|
||||||
if (lfhasflag(player, F_RAGE)) {
|
if (lfhasflag(player, F_RAGE)) {
|
||||||
setcol(statwin, C_RED);
|
setcol(statwin, C_RED);
|
||||||
wprintw(statwin, " Rage");
|
wprintw(statwin, " Rage");
|
||||||
|
|
25
lf.c
25
lf.c
|
@ -9213,6 +9213,16 @@ int getjobrecommendation(race_t *r, job_t *j) {
|
||||||
return rec;
|
return rec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int getkotime(lifeform_t *lf) {
|
||||||
|
int kotime;
|
||||||
|
kotime = rnd(50,100);
|
||||||
|
if (lf != player) {
|
||||||
|
// monsters stay knocked out for a long time
|
||||||
|
kotime *= 10;
|
||||||
|
}
|
||||||
|
return kotime;
|
||||||
|
}
|
||||||
|
|
||||||
int getlastdir(lifeform_t *lf) {
|
int getlastdir(lifeform_t *lf) {
|
||||||
flag_t *f;
|
flag_t *f;
|
||||||
f = lfhasflag(lf, F_LASTDIR);
|
f = lfhasflag(lf, F_LASTDIR);
|
||||||
|
@ -17838,7 +17848,7 @@ void loseconcentration(lifeform_t *lf) {
|
||||||
|
|
||||||
void loseconsciousness(lifeform_t *lf, int howlong, lifeform_t *fromlf) {
|
void loseconsciousness(lifeform_t *lf, int howlong, lifeform_t *fromlf) {
|
||||||
if (!isunconscious(lf)) {
|
if (!isunconscious(lf)) {
|
||||||
fallasleep(lf, ST_KO, rnd(50,100));
|
fallasleep(lf, ST_KO, howlong);
|
||||||
if (fromlf && isplayer(fromlf)) {
|
if (fromlf && isplayer(fromlf)) {
|
||||||
pleasegodmaybe(R_GODMERCY, 5);
|
pleasegodmaybe(R_GODMERCY, 5);
|
||||||
}
|
}
|
||||||
|
@ -17932,7 +17942,7 @@ int losehp_real(lifeform_t *lf, int amt, enum DAMTYPE damtype, lifeform_t *froml
|
||||||
// would this damage reduce the lf to < 0 hp ???
|
// would this damage reduce the lf to < 0 hp ???
|
||||||
hpleftafterdam = lf->hp - amt;
|
hpleftafterdam = lf->hp - amt;
|
||||||
if (lfcanbekod(lf) && (lf->hp > 1) && (hpleftafterdam <= 0)) {
|
if (lfcanbekod(lf) && (lf->hp > 1) && (hpleftafterdam <= 0)) {
|
||||||
int threshold = 0,kochance = 0;
|
int threshold = -10,kochance = 0;
|
||||||
// merciful weapons - these will ALWAYS ko, even if
|
// merciful weapons - these will ALWAYS ko, even if
|
||||||
// they are already unconscious.
|
// they are already unconscious.
|
||||||
if (!ko && fromob) {
|
if (!ko && fromob) {
|
||||||
|
@ -17965,7 +17975,7 @@ int losehp_real(lifeform_t *lf, int amt, enum DAMTYPE damtype, lifeform_t *froml
|
||||||
|
|
||||||
if (damtypeok) {
|
if (damtypeok) {
|
||||||
if (playerinvolved && godprayedto(R_GODMERCY)) {
|
if (playerinvolved && godprayedto(R_GODMERCY)) {
|
||||||
threshold = -10;
|
threshold -= 10;
|
||||||
if (isplayer(lf)) {
|
if (isplayer(lf)) {
|
||||||
// player being hit?
|
// player being hit?
|
||||||
kochance += 75;
|
kochance += 75;
|
||||||
|
@ -17974,15 +17984,14 @@ int losehp_real(lifeform_t *lf, int amt, enum DAMTYPE damtype, lifeform_t *froml
|
||||||
kochance += 30;
|
kochance += 30;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
threshold = -5;
|
|
||||||
kochance += 15; // base chance to KO with bashing.
|
kochance += 15; // base chance to KO with bashing.
|
||||||
}
|
}
|
||||||
|
|
||||||
// TRYING to ko rather than kill?
|
// TRYING to ko rather than kill?
|
||||||
if (fromlf && lfhasflag(fromlf, F_STRIKETOKO)) {
|
if (fromlf && lfhasflag(fromlf, F_STRIKETOKO)) {
|
||||||
if (cansee(fromlf, lf)) {
|
if (cansee(fromlf, lf)) {
|
||||||
kochance += 30;
|
kochance += 50;
|
||||||
threshold -= 5;
|
threshold -= 15;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18364,7 +18373,7 @@ void losehpeffects(lifeform_t *lf, int dam, enum DAMTYPE damtype, lifeform_t *fr
|
||||||
// this is mainly used in attack.c, so that we can announce
|
// this is mainly used in attack.c, so that we can announce
|
||||||
// "you hit xxx. xxx loses consciousness." as opposed to
|
// "you hit xxx. xxx loses consciousness." as opposed to
|
||||||
// "xxx loses consciousness. you hit xxx." which makes no sense!
|
// "xxx loses consciousness. you hit xxx." which makes no sense!
|
||||||
kotime = rnd(50,100);
|
kotime = getkotime(lf);
|
||||||
if (waskod) {
|
if (waskod) {
|
||||||
*waskod = kotime;
|
*waskod = kotime;
|
||||||
} else {
|
} else {
|
||||||
|
@ -20348,7 +20357,7 @@ void precalclos(lifeform_t *lf) {
|
||||||
|
|
||||||
if (plev >= PR_MASTER) {
|
if (plev >= PR_MASTER) {
|
||||||
inc_quad_range(&startq, missingeye ? NULL : &endq, 2);
|
inc_quad_range(&startq, missingeye ? NULL : &endq, 2);
|
||||||
} else if (plev >= PR_ADEPT) {
|
} else if (plev >= PR_BEGINNER) {
|
||||||
inc_quad_range(&startq, missingeye ? NULL : &endq, 1);
|
inc_quad_range(&startq, missingeye ? NULL : &endq, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
1
lf.h
1
lf.h
|
@ -212,6 +212,7 @@ enum JOBCATEGORY getjobcat(lifeform_t *lf);
|
||||||
//enum SUBJOB getsubjob(lifeform_t *lf);
|
//enum SUBJOB getsubjob(lifeform_t *lf);
|
||||||
char *getjobname(lifeform_t *lf);
|
char *getjobname(lifeform_t *lf);
|
||||||
int getjobrecommendation(race_t *r, job_t *j);
|
int getjobrecommendation(race_t *r, job_t *j);
|
||||||
|
int getkotime(lifeform_t *lf);
|
||||||
int getlastdir(lifeform_t *lf);
|
int getlastdir(lifeform_t *lf);
|
||||||
int getleftrightwalls(lifeform_t *lf);
|
int getleftrightwalls(lifeform_t *lf);
|
||||||
int getlfaccuracy(lifeform_t *lf, object_t *wep);
|
int getlfaccuracy(lifeform_t *lf, object_t *wep);
|
||||||
|
|
Loading…
Reference in New Issue