diff -Nbaur nethack-3.4.3/src/monmove.c nethack-cosh/src/monmove.c --- nethack-3.4.3/src/monmove.c 2003-12-08 10:39:13.000000000 +1100 +++ nethack-cosh/src/monmove.c 2007-05-21 12:50:17.000000000 +1000 @@ -1278,7 +1278,8 @@ /* without something like the following, invis. and displ. are too powerful */ - gotu = notseen ? !rn2(3) : Displaced ? !rn2(4) : FALSE; + gotu = notseen ? (Stealth ? !rn2(4) : !rn2(3)) + : (Displaced ? !rn2(4) : FALSE); #if 0 /* this never worked as intended & isn't needed anyway */ /* If invis but not displaced, staying around gets you 'discovered' */ diff -Nbaur nethack-3.4.3/src/objects.c nethack-cosh/src/objects.c --- nethack-3.4.3/src/objects.c 2003-12-08 10:39:13.000000000 +1100 +++ nethack-cosh/src/objects.c 2007-05-18 15:51:57.000000000 +1000 @@ -227,17 +227,19 @@ 0, 0, 1, 4,100, 8, 8, 6, 0, B|P, P_POLEARMS, IRON, HI_METAL), /* bludgeons */ +WEAPON("cosh", (char *)0, + 1, 0, 0, 6, 10, 2, 1, 1, 0, B, P_CLUB, WOOD, HI_WOOD), WEAPON("mace", (char *)0, 1, 0, 0, 40, 30, 5, 6, 6, 0, B, P_MACE, IRON, HI_METAL), /* +1 small */ WEAPON("morning star", (char *)0, - 1, 0, 0, 12,120, 10, 4, 6, 0, B, P_MORNING_STAR, IRON, HI_METAL), + 1, 0, 0, 10,120, 10, 4, 6, 0, B, P_MORNING_STAR, IRON, HI_METAL), /* +d4 small, +1 large */ WEAPON("war hammer", (char *)0, - 1, 0, 0, 15, 50, 5, 4, 4, 0, B, P_HAMMER, IRON, HI_METAL), + 1, 0, 0, 13, 50, 5, 4, 4, 0, B, P_HAMMER, IRON, HI_METAL), /* +1 small */ WEAPON("club", (char *)0, - 1, 0, 0, 12, 30, 3, 6, 3, 0, B, P_CLUB, WOOD, HI_WOOD), + 1, 0, 0, 10, 30, 3, 6, 3, 0, B, P_CLUB, WOOD, HI_WOOD), #ifdef KOPS WEAPON("rubber hose", (char *)0, 1, 0, 0, 0, 20, 3, 4, 3, 0, B, P_WHIP, PLASTIC, CLR_BROWN), diff -Nbaur nethack-3.4.3/src/u_init.c nethack-cosh/src/u_init.c --- nethack-3.4.3/src/u_init.c 2003-12-08 10:39:13.000000000 +1100 +++ nethack-cosh/src/u_init.c 2007-05-21 13:42:25.000000000 +1000 @@ -175,6 +175,10 @@ * Optional extra inventory items. */ +static struct trobj Cosh[] = { + { COSH, 0, WEAPON_CLASS, 1, 0 }, + { 0, 0, 0, 0, 0 } +}; static struct trobj Tinopener[] = { { TIN_OPENER, 0, TOOL_CLASS, 1, 0 }, { 0, 0, 0, 0, 0 } @@ -689,6 +693,7 @@ #endif ini_inv(Rogue); if(!rn2(5)) ini_inv(Blindfold); + if(!rn2(3)) ini_inv(Cosh); knows_object(SACK); skill_init(Skill_R); break; diff -Nbaur nethack-3.4.3/src/uhitm.c nethack-cosh/src/uhitm.c --- nethack-3.4.3/src/uhitm.c 2003-12-08 10:39:13.000000000 +1100 +++ nethack-cosh/src/uhitm.c 2007-05-21 13:37:50.000000000 +1000 @@ -600,12 +600,47 @@ } else { tmp = dmgval(obj, mon); /* a minimal hit doesn't exercise proficiency */ - valid_weapon_attack = (tmp > 1); + /* except for the cosh, which only does mininal hits */ + valid_weapon_attack = (tmp > 1) || (obj->otyp == COSH); + + /* MRKR: this is necessary to make the backstab + * check below work. Otherwise, if the player + * is faster than the monster, they can get backstabs + * in just by moving in between strikes. + */ + set_apparxy(mon); + if (!valid_weapon_attack || mon == u.ustuck || u.twoweap) { ; /* no special bonuses */ - } else if (mon->mflee && Role_if(PM_ROGUE) && !Upolyd) { + } else if (Stealth && haseyes(mon->data) && + (mon->mux != u.ux || mon->muy != u.uy)) { + You("strike %s from behind!", mon_nam(mon)); + if (Role_if(PM_KNIGHT) && u.ualign.type == A_LAWFUL) { + You("scoundrel!"); + adjalign(-1); + } + + if (obj->otyp == COSH && mon->mcanmove) { + int r = rn2(6) - obj->spe; + if (r >= P_SKILL(P_CLUB) || obj->spe < 0) { + pline("%s %s for a moment.", + Monnam(mon), + makeplural(stagger(mon->data, "stagger"))); + mon->mstun = 1; + } + else { + int amt = d(1 + obj->spe , 12); + pline("%s %s unconcious.", + Monnam(mon), + makeplural(stagger(mon->data, "fall"))); + mon->mcanmove = 0; + mon->mfrozen = min(amt, 127); + } + } + else { tmp += rnd(u.ulevel); + } hittxt = TRUE; } else if (dieroll == 2 && obj == uwep && obj->oclass == WEAPON_CLASS &&