From 1ac71854a3a473837eea2de9ba3842f3c3ae6be3 Mon Sep 17 00:00:00 2001 From: "nethack.allison" Date: Sun, 3 Aug 2003 18:05:36 +0000 Subject: [PATCH] buglist item (main trunk only) > The lighting store doesn't sell oil (probably never added when > POT_OIL was added). There currently isn't enough room in the > shclass struct for another item, but that could be expanded. I > think adding oil there would be useful for the post-3.4.x > version. --- doc/fixes35.0 | 1 + include/mkroom.h | 2 +- src/shknam.c | 39 ++++++++++++++++++++++++--------------- 3 files changed, 26 insertions(+), 16 deletions(-) diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 66a4c56ed..603ad44be 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -42,6 +42,7 @@ burying a punishment ball no longer ends your punishment #tip command--pay a modest gratuity add clicklook option to allow looking at things on the display by clicking right mouse button when floating mouse pointer over them +Izchak's lighting store is now able to stock oil for your lamp Platform- and/or Interface-Specific New Features diff --git a/include/mkroom.h b/include/mkroom.h index b1363bd08..85c67fccb 100644 --- a/include/mkroom.h +++ b/include/mkroom.h @@ -30,7 +30,7 @@ struct shclass { struct itp { int iprob; /* probability of an item type */ int itype; /* item type: if >=0 a class, if < 0 a specific item */ - } iprobs[5]; + } iprobs[6]; const char * const *shknms; /* list of shopkeeper names for this type */ }; diff --git a/src/shknam.c b/src/shknam.c index cb1085754..77c8c2660 100644 --- a/src/shknam.c +++ b/src/shknam.c @@ -183,42 +183,51 @@ static const char * const shkgeneral[] = { */ const struct shclass shtypes[] = { - {"general store", RANDOM_CLASS, 44, - D_SHOP, {{100, RANDOM_CLASS}, {0, 0}, {0, 0}}, shkgeneral}, - {"used armor dealership", ARMOR_CLASS, 14, - D_SHOP, {{90, ARMOR_CLASS}, {10, WEAPON_CLASS}, {0, 0}}, - shkarmors}, + {"general store", RANDOM_CLASS, 44, D_SHOP, + {{100, RANDOM_CLASS}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}, + shkgeneral}, + {"used armor dealership", ARMOR_CLASS, 14, D_SHOP, + {{90, ARMOR_CLASS}, {10, WEAPON_CLASS}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}, + shkarmors}, {"second-hand bookstore", SCROLL_CLASS, 10, D_SHOP, - {{90, SCROLL_CLASS}, {10, SPBOOK_CLASS}, {0, 0}}, shkbooks}, + {{90, SCROLL_CLASS}, {10, SPBOOK_CLASS}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}, + shkbooks}, {"liquor emporium", POTION_CLASS, 10, D_SHOP, - {{100, POTION_CLASS}, {0, 0}, {0, 0}}, shkliquors}, + {{100, POTION_CLASS}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}, + shkliquors}, {"antique weapons outlet", WEAPON_CLASS, 5, D_SHOP, - {{90, WEAPON_CLASS}, {10, ARMOR_CLASS}, {0, 0}}, shkweapons}, + {{90, WEAPON_CLASS}, {10, ARMOR_CLASS}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}, + shkweapons}, {"delicatessen", FOOD_CLASS, 5, D_SHOP, {{83, FOOD_CLASS}, {5, -POT_FRUIT_JUICE}, {4, -POT_BOOZE}, - {5, -POT_WATER}, {3, -ICE_BOX}}, shkfoods}, + {5, -POT_WATER}, {3, -ICE_BOX}, {0, 0}}, + shkfoods}, {"jewelers", RING_CLASS, 3, D_SHOP, - {{85, RING_CLASS}, {10, GEM_CLASS}, {5, AMULET_CLASS}, {0, 0}}, + {{85, RING_CLASS}, {10, GEM_CLASS}, {5, AMULET_CLASS}, + {0, 0}, {0, 0}, {0, 0}}, shkrings}, {"quality apparel and accessories", WAND_CLASS, 3, D_SHOP, {{90, WAND_CLASS}, {5, -LEATHER_GLOVES}, {5, -ELVEN_CLOAK}, {0, 0}}, shkwands}, {"hardware store", TOOL_CLASS, 3, D_SHOP, - {{100, TOOL_CLASS}, {0, 0}, {0, 0}}, shktools}, + {{100, TOOL_CLASS}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}, + shktools}, /* Actually shktools is ignored; the code specifically chooses a * random implementor name (along with candle shops having * random shopkeepers) */ {"rare books", SPBOOK_CLASS, 3, D_SHOP, - {{90, SPBOOK_CLASS}, {10, SCROLL_CLASS}, {0, 0}}, shkbooks}, + {{90, SPBOOK_CLASS}, {10, SCROLL_CLASS}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}, + shkbooks}, /* Shops below this point are "unique". That is they must all have a * probability of zero. They are only created via the special level * loader. */ {"lighting store", TOOL_CLASS, 0, D_SHOP, - {{32, -WAX_CANDLE}, {50, -TALLOW_CANDLE}, - {5, -BRASS_LANTERN}, {10, -OIL_LAMP}, {3, -MAGIC_LAMP}}, shklight}, - {(char *)0, 0, 0, 0, {{0, 0}, {0, 0}, {0, 0}}, 0} + {{30, -WAX_CANDLE}, {48, -TALLOW_CANDLE}, {5, -BRASS_LANTERN}, + {9, -OIL_LAMP}, {3, -MAGIC_LAMP}, {5, -POT_OIL}}, + shklight}, + {(char *)0, 0, 0, 0, {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}, 0} }; #if 0 -- 2.40.0