decrease a towel's wetness; unlike when wetting, 0 is not a no-op */
| 1064 | |
| 1065 | /* decrease a towel's wetness; unlike when wetting, 0 is not a no-op */ |
| 1066 | void |
| 1067 | dry_a_towel( |
| 1068 | struct obj *obj, |
| 1069 | int amt, /* positive or zero: new value; negative: decrement by abs(amt) */ |
| 1070 | boolean verbose) |
| 1071 | { |
| 1072 | int newspe = (amt < 0) ? obj->spe + amt : amt; |
| 1073 | |
| 1074 | /* new state is only reported if it's a decrease */ |
| 1075 | if (newspe < obj->spe) { |
| 1076 | if (verbose) { |
| 1077 | if (carried(obj)) |
| 1078 | pline("%s dries%s.", Yobjnam2(obj, (const char *) 0), |
| 1079 | !newspe ? " out" : ""); |
| 1080 | else if (mcarried(obj) && canseemon(obj->ocarry)) |
| 1081 | pline("%s %s dries%s.", s_suffix(Monnam(obj->ocarry)), |
| 1082 | xname(obj), !newspe ? " out" : ""); |
| 1083 | } |
| 1084 | } |
| 1085 | |
| 1086 | if (newspe != obj->spe) |
| 1087 | finish_towel_change(obj, newspe); |
| 1088 | } |
| 1089 | |
| 1090 | /* copy the skill level name into the given buffer */ |
| 1091 | char * |
no test coverage detected