This is a fairly trivial code change but should have been done long ago...
polymorphed spellbooks may turn blank or be too faint to read
avoid inappropriate message when using a cursed lamp while blind
player polymorphed as a guardian naga spit the wrong kind of venom
+put #define for potion occupant chance and cursed wand zap chance in one place
Platform- and/or Interface-Specific Fixes
#define RANDOM_TIN (-2)
#define HEALTHY_TIN (-3)
+/* Some misc definitions */
+#define POTION_OCCUPANT_CHANCE(n) (13 + 2*(n))
+#define WAND_BACKFIRE_CHANCE 100
+
/* Flags to control menus */
#define MENUTYPELEN sizeof("traditional ")
#define MENU_TRADITIONAL 0
static const char *empty = "The potion turns out to be empty.";
const char *potion_descr;
struct monst *mtmp;
-#define POTION_OCCUPANT_CHANCE(n) (13 + 2*(n)) /* also in potion.c */
potion_descr = OBJ_DESCR(objects[obj->otyp]);
if (potion_descr && !strcmp(potion_descr, "milky")) {
return 2;
}
}
- if (obj->oclass == WAND_CLASS && obj->cursed && !rn2(100)) {
+ if (obj->oclass == WAND_CLASS && obj->cursed && !rn2(WAND_BACKFIRE_CHANCE)) {
int dam = d(obj->spe+2, 6);
if (!Deaf) {
if(!otmp) return(0);
otmp->in_use = TRUE; /* you've opened the stopper */
-#define POTION_OCCUPANT_CHANCE(n) (13 + 2*(n)) /* also in muse.c */
-
potion_descr = OBJ_DESCR(objects[otmp->otyp]);
if (potion_descr) {
if (!strcmp(potion_descr, "milky") &&
/* zappable addition done by GAN 11/03/86 */
if(!zappable(obj)) pline(nothing_happens);
- else if(obj->cursed && !rn2(100)) {
+ else if(obj->cursed && !rn2(WAND_BACKFIRE_CHANCE)) {
backfire(obj); /* the wand blows up in your face! */
exercise(A_STR, FALSE);
return(1);