Wet towels deal more damage

Dipping a towel into a potion, fountain, or some other water source
makes the towel wet.  Hitting with a wet towel deals up to 6 points
of damage, but every hit reduces wetness, as does throwing or applying
the towel.  You can also wish for a moist or wet towel.
This commit is contained in:
Pasi Kallinen
2015-10-13 16:27:58 +03:00
parent 8160990f99
commit 1703818a11
7 changed files with 32 additions and 0 deletions

View File

@@ -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

View File

@@ -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.");

View File

@@ -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;

View File

@@ -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 */

View File

@@ -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];

View File

@@ -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;

View File

@@ -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