patch: #defines

This is a fairly trivial code change but should have been done long ago...
This commit is contained in:
arromdee
2006-02-09 03:26:59 +00:00
parent 02a2e8b6ef
commit 83807a84f5
5 changed files with 7 additions and 5 deletions

View File

@@ -67,7 +67,6 @@ struct obj *obj;
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")) {
@@ -121,7 +120,7 @@ struct obj *obj;
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) {

View File

@@ -400,8 +400,6 @@ dodrink()
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") &&

View File

@@ -1932,7 +1932,7 @@ dozap()
/* 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);