1
0
Fork 0
mirror of https://codeberg.org/noisytoot/notnotdnethack.git synced 2025-05-15 12:05:04 +01:00

Reduce puddle message spam

If your boots are rustproof or max eroded AND you've seen a message recently, don't try rusting them again.

Also drop support for STEED def and correctly allow riding to protect the inventories of very small PCs.

Also fixes the tabbing in this region
This commit is contained in:
chris 2024-03-23 17:36:07 -04:00
parent b7a666d7a7
commit 872c619629

View file

@ -2026,32 +2026,37 @@ stillinwater:;
return;
} else if (IS_PUDDLE(levl[u.ux][u.uy].typ) && !Wwalking) {
/*You("%s through the shallow water.",
verysmall(youmonst.data) ? "wade" : "splash");
if (!verysmall(youmonst.data) && !rn2(4)) wake_nearby();*/
/*You("%s through the shallow water.",
verysmall(youmonst.data) ? "wade" : "splash");
if (!verysmall(youmonst.data) && !rn2(4)) wake_nearby();*/
if(u.umonnum == PM_GREMLIN)
(void)split_mon(&youmonst, (struct monst *)0);
else if (is_iron(youracedata) &&
/* mud boots keep the feet dry */
(!uarmf || strncmp(OBJ_DESCR(objects[uarmf->otyp]), "mud ", 4))
) {
int dam = rnd(6);
Your("%s rust!", makeplural(body_part(FOOT)));
if (u.mhmax > dam) u.mhmax -= dam;
losehp(dam, "rusting away", KILLED_BY);
// } else if (is_longworm(youmonst.data)) { /* water is lethal to Shai-Hulud */
// int dam = d(3,12);
// if (u.mhmax > dam) u.mhmax -= (dam+1) / 2;
// pline_The("water burns your flesh!");
// losehp(dam,"contact with water",KILLED_BY);
if(u.umonnum == PM_GREMLIN)
(void)split_mon(&youmonst, (struct monst *)0);
else if (is_iron(youracedata) &&
/* mud boots keep the feet dry */
(!uarmf || strncmp(OBJ_DESCR(objects[uarmf->otyp]), "mud ", 4))
) {
int dam = rnd(6);
Your("%s rust!", makeplural(body_part(FOOT)));
if (u.mhmax > dam) u.mhmax -= dam;
losehp(dam, "rusting away", KILLED_BY);
// } else if (is_longworm(youmonst.data)) { /* water is lethal to Shai-Hulud */
// int dam = d(3,12);
// if (u.mhmax > dam) u.mhmax -= (dam+1) / 2;
// pline_The("water burns your flesh!");
// losehp(dam,"contact with water",KILLED_BY);
}
if (!u.usteed){
static long rustmessage_turn = 0L;
if (verysmall(youmonst.data)){
water_damage(invent, FALSE,FALSE,FALSE,(struct monst *) 0);
}
else if(rustmessage_turn < monstermoves || (is_rustprone(uarmf) && !uarmf->oerodeproof && uarmf->oeroded != MAX_ERODE)){
(void)rust_dmg(uarmf, "boots", 1, TRUE, &youmonst, FALSE);
rustmessage_turn = monstermoves + 100;
}
}
}
if (verysmall(youmonst.data)) water_damage(invent, FALSE,FALSE,FALSE,(struct monst *) 0);
#ifdef STEED
if (!u.usteed)
#endif
(void)rust_dmg(uarmf, "boots", 1, TRUE, &youmonst, FALSE);
}
if (uarmf && uarmf->oartifact == ART_FROST_TREADS
&& is_pool(u.ux, u.uy, TRUE) && !is_3dwater(u.ux, u.uy) && !Is_waterlevel(&u.uz)) {
zap_over_floor(u.ux, u.uy, AD_COLD, WAND_CLASS, FALSE, NULL);