diff --git a/doc/fixes36.0 b/doc/fixes36.0 index 3c1e14a1b..5dcc50fec 100644 --- a/doc/fixes36.0 +++ b/doc/fixes36.0 @@ -1158,6 +1158,7 @@ stop travel or run when you get hungry debug-mode viewing of object weight prizes on various levels now protected by ?oSM scrolls as well as Elbereth regexes now use system libraries consistently for all pattern-matching systems +wet towels deal more damage Platform- and/or Interface-Specific New Features diff --git a/src/apply.c b/src/apply.c index de27f96b8..476c700dd 100644 --- a/src/apply.c +++ b/src/apply.c @@ -102,6 +102,7 @@ struct obj *obj; incr_itimeout(&Glib, rn1(10, 3)); Your("%s %s!", makeplural(body_part(HAND)), (old ? "are filthier than ever" : "get slimy")); + if (obj->spe > 0) obj->spe--; return 1; case 1: if (!ublindf) { @@ -127,6 +128,7 @@ struct obj *obj; dropx(saved_ublindf); } } + if (obj->spe > 0) obj->spe--; return 1; case 0: break; @@ -136,10 +138,12 @@ struct obj *obj; if (Glib) { Glib = 0; You("wipe off your %s.", makeplural(body_part(HAND))); + if (obj->spe > 0) obj->spe--; return 1; } else if (u.ucreamed) { Blinded -= u.ucreamed; u.ucreamed = 0; + if (obj->spe > 0) obj->spe--; if (!Blinded) { pline("You've got the glop off."); diff --git a/src/dothrow.c b/src/dothrow.c index 239f27def..34c8e8689 100644 --- a/src/dothrow.c +++ b/src/dothrow.c @@ -87,6 +87,7 @@ int shotlimit; Sprintf(killer.name, "throwing %s bare-handed", killer_xname(obj)); instapetrify(killer.name); } + if (obj->otyp == TOWEL && obj->spe > 0) obj->spe--; if (welded(obj)) { weldmsg(obj); return 1; diff --git a/src/objnam.c b/src/objnam.c index 6fa6a1d37..07586b615 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -308,6 +308,8 @@ unsigned cxn_flags; /* bitmask of CXN_xxx values */ case TOOL_CLASS: if (typ == LENSES) Strcpy(buf, "pair of "); + else if (typ == TOWEL && obj->spe > 0) + Strcpy(buf, (obj->spe < 3) ? "moist " : "wet "); if (!dknown) Strcat(buf, dn ? dn : actualn); @@ -2399,6 +2401,7 @@ struct obj *no_wish; int halfeaten, mntmp, contents; int islit, unlabeled, ishistoric, isdiluted, trapped; int tmp, tinv, tvariety; + int wetness; struct fruit *f; int ftype = context.current_fruit; char fruitbuf[BUFSZ]; @@ -2432,6 +2435,7 @@ struct obj *no_wish; contents = UNDEFINED; oclass = 0; actualn = dn = un = 0; + wetness = 0; if (!bp) goto any; @@ -2472,6 +2476,12 @@ struct obj *no_wish; } else if (!strncmpi(bp, "blessed ", l = 8) || !strncmpi(bp, "holy ", l = 5)) { blessed = 1; + } else if (!strncmpi(bp, "moist ", l = 6) + || !strncmpi(bp, "wet ", l = 4)) { + if (!strncmpi(bp, "wet ", 4)) + wetness = rn2(3) + 3; + else + wetness = rnd(2); } else if (!strncmpi(bp, "cursed ", l = 7) || !strncmpi(bp, "unholy ", l = 7)) { iscursed = 1; @@ -3274,6 +3284,9 @@ typfnd: otmp->spe = 1; } break; + case TOWEL: + if (wetness) otmp->spe = wetness; + break; case SLIME_MOLD: otmp->spe = ftype; /* Fall through */ diff --git a/src/potion.c b/src/potion.c index 64d08d5a4..6bc3e1e78 100644 --- a/src/potion.c +++ b/src/potion.c @@ -1933,6 +1933,12 @@ dodip() return (1); } + if (potion->otyp == POT_WATER && obj->otyp == TOWEL) { + pline_The("towel soaks it up!"); + /* wetting the towel already done via H2Opotion_dip */ + goto poof; + } + if (is_poisonable(obj)) { if (potion->otyp == POT_SICKNESS && !obj->opoisoned) { char buf[BUFSZ]; diff --git a/src/trap.c b/src/trap.c index d02ec1537..a7572f603 100644 --- a/src/trap.c +++ b/src/trap.c @@ -3307,6 +3307,9 @@ boolean force; if (obj->otyp == CAN_OF_GREASE && obj->spe > 0) { return ER_NOTHING; + } else if (obj->otyp == TOWEL && obj->spe < 7) { + obj->spe = max(obj->spe, rn2(8)); + return ER_NOTHING; } else if (obj->greased) { if (!rn2(2)) obj->greased = 0; diff --git a/src/uhitm.c b/src/uhitm.c index 83d3163e4..e7596c879 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -925,6 +925,10 @@ int thrown; /* HMON_xxx (0 => hand-to-hand, other => ranged) */ /* non-weapons can damage because of their weight */ /* (but not too much) */ tmp = obj->owt / 100; + if (obj->otyp == TOWEL && obj->spe > 0) { /* wet towel */ + tmp += obj->spe; + obj->spe--; + } if (tmp < 1) tmp = 1; else