diff --git a/data.c b/data.c index 0a73dd4..ed0a2ab 100755 --- a/data.c +++ b/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 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 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_BEGINNER, "^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_MASTER, "^gYou field of vision now extends behind you.^n", B_TRUE); addskill(SK_STEALTH, "Stealth", "Affects your ability to move silently.", 0); // untrainable? diff --git a/io.c b/io.c index 9d5f325..e9f8c0e 100755 --- a/io.c +++ b/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); // they knock you out msg("^%d*WHACK*^n", C_YELLOW); - fallasleep(player, ST_KO, rnd(50,100)); + loseconsciousness(player, getkotime(player),lf); // they take all your stuff /* for (o = player->pack->first ; o ; o = nexto) { @@ -7059,7 +7059,7 @@ char *makedesc_ob(object_t *o, char *retbuf) { } // item value - if (getskill(player, SK_PERCEPTION) >= PR_EXPERT) { + if (getskill(player, SK_PERCEPTION) >= PR_ADEPT) { showvalue = B_TRUE; } if (!showvalue) { @@ -11941,6 +11941,11 @@ void drawstatus(void) { 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)) { setcol(statwin, C_RED); wprintw(statwin, " Rage"); diff --git a/lf.c b/lf.c index 945119f..b193e42 100755 --- a/lf.c +++ b/lf.c @@ -9213,6 +9213,16 @@ int getjobrecommendation(race_t *r, job_t *j) { 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) { flag_t *f; f = lfhasflag(lf, F_LASTDIR); @@ -17838,7 +17848,7 @@ void loseconcentration(lifeform_t *lf) { void loseconsciousness(lifeform_t *lf, int howlong, lifeform_t *fromlf) { if (!isunconscious(lf)) { - fallasleep(lf, ST_KO, rnd(50,100)); + fallasleep(lf, ST_KO, howlong); if (fromlf && isplayer(fromlf)) { 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 ??? hpleftafterdam = lf->hp - amt; 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 // they are already unconscious. if (!ko && fromob) { @@ -17965,7 +17975,7 @@ int losehp_real(lifeform_t *lf, int amt, enum DAMTYPE damtype, lifeform_t *froml if (damtypeok) { if (playerinvolved && godprayedto(R_GODMERCY)) { - threshold = -10; + threshold -= 10; if (isplayer(lf)) { // player being hit? kochance += 75; @@ -17974,15 +17984,14 @@ int losehp_real(lifeform_t *lf, int amt, enum DAMTYPE damtype, lifeform_t *froml kochance += 30; } } else { - threshold = -5; kochance += 15; // base chance to KO with bashing. } // TRYING to ko rather than kill? if (fromlf && lfhasflag(fromlf, F_STRIKETOKO)) { if (cansee(fromlf, lf)) { - kochance += 30; - threshold -= 5; + kochance += 50; + 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 // "you hit xxx. xxx loses consciousness." as opposed to // "xxx loses consciousness. you hit xxx." which makes no sense! - kotime = rnd(50,100); + kotime = getkotime(lf); if (waskod) { *waskod = kotime; } else { @@ -20348,7 +20357,7 @@ void precalclos(lifeform_t *lf) { if (plev >= PR_MASTER) { 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); } diff --git a/lf.h b/lf.h index 3300187..967a95e 100755 --- a/lf.h +++ b/lf.h @@ -212,6 +212,7 @@ enum JOBCATEGORY getjobcat(lifeform_t *lf); //enum SUBJOB getsubjob(lifeform_t *lf); char *getjobname(lifeform_t *lf); int getjobrecommendation(race_t *r, job_t *j); +int getkotime(lifeform_t *lf); int getlastdir(lifeform_t *lf); int getleftrightwalls(lifeform_t *lf); int getlfaccuracy(lifeform_t *lf, object_t *wep);