Use define for wand wresting chance

This commit is contained in:
Pasi Kallinen
2021-07-17 20:59:40 +03:00
parent bb74aeef03
commit 8ff2badf51
2 changed files with 2 additions and 1 deletions

View File

@@ -480,6 +480,7 @@ enum bodypart_types {
/* Some misc definitions */
#define POTION_OCCUPANT_CHANCE(n) (13 + 2 * (n))
#define WAND_BACKFIRE_CHANCE 100
#define WAND_WREST_CHANCE 121
#define BALL_IN_MON (u.uswallow && uball && uball->where == OBJ_FREE)
#define CHAIN_IN_MON (u.uswallow && uchain && uchain->where == OBJ_FREE)
#define NODIAG(monnum) ((monnum) == PM_GRID_BUG)

View File

@@ -2243,7 +2243,7 @@ bhitpile(
int
zappable(struct obj *wand)
{
if (wand->spe < 0 || (wand->spe == 0 && rn2(121)))
if (wand->spe < 0 || (wand->spe == 0 && rn2(WAND_WREST_CHANCE)))
return 0;
if (wand->spe == 0)
You("wrest one last charge from the worn-out wand.");