diff -Naur nethack-3.4.3/include/obj.h nethack-mining/include/obj.h --- nethack-3.4.3/include/obj.h 2003-12-08 10:39:13.000000000 +1100 +++ nethack-mining/include/obj.h 2004-08-19 15:15:10.000000000 +1000 @@ -268,6 +268,7 @@ /* MAGIC_LAMP intentionally excluded below */ /* age field of this is relative age rather than absolute */ #define age_is_relative(otmp) ((otmp)->otyp == BRASS_LANTERN\ + || (otmp)->otyp == DWARVISH_IRON_HELM\ || (otmp)->otyp == OIL_LAMP\ || (otmp)->otyp == CANDELABRUM_OF_INVOCATION\ || (otmp)->otyp == TALLOW_CANDLE\ @@ -275,6 +276,7 @@ || (otmp)->otyp == POT_OIL) /* object can be ignited */ #define ignitable(otmp) ((otmp)->otyp == BRASS_LANTERN\ + || (otmp)->otyp == DWARVISH_IRON_HELM\ || (otmp)->otyp == OIL_LAMP\ || (otmp)->otyp == CANDELABRUM_OF_INVOCATION\ || (otmp)->otyp == TALLOW_CANDLE\ diff -Naur nethack-3.4.3/src/apply.c nethack-mining/src/apply.c --- nethack-3.4.3/src/apply.c 2003-12-08 10:39:13.000000000 +1100 +++ nethack-mining/src/apply.c 2004-08-19 14:06:22.000000000 +1000 @@ -1070,7 +1070,8 @@ } if(obj->lamplit) { if(obj->otyp == OIL_LAMP || obj->otyp == MAGIC_LAMP || - obj->otyp == BRASS_LANTERN) + obj->otyp == BRASS_LANTERN || + obj->otyp == DWARVISH_IRON_HELM) pline("%s lamp is now off.", Shk_Your(buf, obj)); else You("snuff out %s.", yname(obj)); @@ -1080,7 +1081,8 @@ /* magic lamps with an spe == 0 (wished for) cannot be lit */ if ((!Is_candle(obj) && obj->age == 0) || (obj->otyp == MAGIC_LAMP && obj->spe == 0)) { - if (obj->otyp == BRASS_LANTERN) + if (obj->otyp == BRASS_LANTERN + || obj->otyp == DWARVISH_IRON_HELM) Your("lamp has run out of power."); else pline("This %s has no oil.", xname(obj)); return; @@ -1090,7 +1092,8 @@ Tobjnam(obj, "flicker"), otense(obj, "die")); } else { if(obj->otyp == OIL_LAMP || obj->otyp == MAGIC_LAMP || - obj->otyp == BRASS_LANTERN) { + obj->otyp == BRASS_LANTERN + || obj->otyp == DWARVISH_IRON_HELM) { check_unpaid(obj); pline("%s lamp is now on.", Shk_Your(buf, obj)); } else { /* candle(s) */ @@ -2785,13 +2788,16 @@ if(check_capacity((char *)0)) return (0); - if (carrying(POT_OIL) || uhave_graystone()) + if (carrying(POT_OIL) || uhave_graystone()) Strcpy(class_list, tools_too); else Strcpy(class_list, tools); if (carrying(CREAM_PIE) || carrying(EUCALYPTUS_LEAF)) add_class(class_list, FOOD_CLASS); + if (carrying(DWARVISH_IRON_HELM)) + add_class(class_list, ARMOR_CLASS); + obj = getobj(class_list, "use or apply"); if(!obj) return 0; @@ -2903,6 +2909,12 @@ case TALLOW_CANDLE: use_candle(&obj); break; + +/* MRKR: dwarvish helms are mining helmets. + * They can be used as brass lanterns. + * From an idea posted to RGRN by "Dr Darth" + */ + case DWARVISH_IRON_HELM: case OIL_LAMP: case MAGIC_LAMP: case BRASS_LANTERN: diff -Naur nethack-3.4.3/src/invent.c nethack-mining/src/invent.c --- nethack-3.4.3/src/invent.c 2003-12-08 10:39:13.000000000 +1100 +++ nethack-mining/src/invent.c 2004-08-19 13:59:11.000000000 +1000 @@ -889,6 +889,9 @@ !objects[POT_OIL].oc_name_known)) || (otmp->oclass == FOOD_CLASS && otyp != CREAM_PIE && otyp != EUCALYPTUS_LEAF) || + /* MRKR: mining helmets */ + (otmp->oclass == ARMOR_CLASS && + otyp != DWARVISH_IRON_HELM) || (otmp->oclass == GEM_CLASS && !is_graystone(otmp)))) || (!strcmp(word, "invoke") && (!otmp->oartifact && !objects[otyp].oc_unique && diff -Naur nethack-3.4.3/src/makemon.c nethack-mining/src/makemon.c --- nethack-3.4.3/src/makemon.c 2003-12-08 10:39:13.000000000 +1100 +++ nethack-mining/src/makemon.c 2004-08-19 14:28:27.000000000 +1000 @@ -310,7 +310,17 @@ (void)mongets(mtmp, AXE); (void)mongets(mtmp, DWARVISH_ROUNDSHIELD); } - (void)mongets(mtmp, DWARVISH_IRON_HELM); + if (In_mines(&u.uz)) { + /* MRKR: Dwarves in dark mines have their lamps on. */ + otmp = mksobj(DWARVISH_IRON_HELM, TRUE, FALSE); + (void) mpickobj(mtmp, otmp); + + if (!levl[mtmp->mx][mtmp->my].lit) { + begin_burn(otmp, FALSE); + } + } + else + (void)mongets(mtmp, DWARVISH_IRON_HELM); if (!rn2(3)) (void)mongets(mtmp, DWARVISH_MITHRIL_COAT); } else { diff -Naur nethack-3.4.3/src/mkobj.c nethack-mining/src/mkobj.c --- nethack-3.4.3/src/mkobj.c 2003-12-08 10:39:13.000000000 +1100 +++ nethack-mining/src/mkobj.c 2004-08-19 14:12:59.000000000 +1000 @@ -572,6 +572,12 @@ otmp->oerodeproof = otmp->rknown = 1; #endif } + + /* MRKR: Mining helmets have lamps */ + if (otmp->otyp == DWARVISH_IRON_HELM) { + otmp->age = (long) rn1(500,1000); + otmp->lamplit = 0; + } break; case WAND_CLASS: if(otmp->otyp == WAN_WISHING) otmp->spe = rnd(3); else diff -Naur nethack-3.4.3/src/read.c nethack-mining/src/read.c --- nethack-3.4.3/src/read.c 2003-12-08 10:39:13.000000000 +1100 +++ nethack-mining/src/read.c 2004-08-19 14:22:32.000000000 +1000 @@ -294,7 +294,8 @@ ever created the above will need to be revised */ } - } else if (obj->oclass == TOOL_CLASS) { + } else if (obj->oclass == TOOL_CLASS + || obj->otyp == DWARVISH_IRON_HELM) { int rechrg = (int)obj->recharged; if (objects[obj->otyp].oc_charged) { @@ -349,21 +350,31 @@ p_glow2(obj, NH_WHITE); } break; + case DWARVISH_IRON_HELM: case OIL_LAMP: case BRASS_LANTERN: if (is_cursed) { - stripspe(obj); + if (obj->otyp == DWARVISH_IRON_HELM) { + /* Don't affect the +/- of the helm */ + obj->age = 0; + } + else + stripspe(obj); if (obj->lamplit) { if (!Blind) pline("%s out!", Tobjnam(obj, "go")); end_burn(obj, TRUE); } } else if (is_blessed) { - obj->spe = 1; + if (obj->otyp != DWARVISH_IRON_HELM) { + obj->spe = 1; + } obj->age = 1500; p_glow2(obj, NH_BLUE); } else { - obj->spe = 1; + if (obj->otyp != DWARVISH_IRON_HELM) { + obj->spe = 1; + } obj->age += 750; if (obj->age > 1500) obj->age = 1500; p_glow1(obj); diff -Naur nethack-3.4.3/src/timeout.c nethack-mining/src/timeout.c --- nethack-3.4.3/src/timeout.c 2003-12-08 10:39:13.000000000 +1100 +++ nethack-mining/src/timeout.c 2004-08-19 14:08:00.000000000 +1000 @@ -810,6 +810,7 @@ obj = (struct obj *) 0; break; + case DWARVISH_IRON_HELM: case BRASS_LANTERN: case OIL_LAMP: switch((int)obj->age) { @@ -817,7 +818,8 @@ case 100: case 50: if (canseeit) { - if (obj->otyp == BRASS_LANTERN) + if (obj->otyp == BRASS_LANTERN + || obj->otyp == DWARVISH_IRON_HELM) lantern_message(obj); else see_lamp_flicker(obj, @@ -827,7 +829,8 @@ case 25: if (canseeit) { - if (obj->otyp == BRASS_LANTERN) + if (obj->otyp == BRASS_LANTERN + || obj->otyp == DWARVISH_IRON_HELM) lantern_message(obj); else { switch (obj->where) { @@ -851,7 +854,8 @@ switch (obj->where) { case OBJ_INVENT: case OBJ_MINVENT: - if (obj->otyp == BRASS_LANTERN) + if (obj->otyp == BRASS_LANTERN + || obj->otyp == DWARVISH_IRON_HELM) pline("%s lantern has run out of power.", whose); else @@ -859,7 +863,8 @@ whose, xname(obj)); break; case OBJ_FLOOR: - if (obj->otyp == BRASS_LANTERN) + if (obj->otyp == BRASS_LANTERN + || obj->otyp == DWARVISH_IRON_HELM) You("see a lantern run out of power."); else You("see %s go out.", @@ -1062,6 +1067,7 @@ radius = 1; /* very dim light */ break; + case DWARVISH_IRON_HELM: case BRASS_LANTERN: case OIL_LAMP: /* magic times are 150, 100, 50, 25, and 0 */