version 1.78 | | version 1.79 |
---|
| | |
/* | | /* |
* static char *rcsid_spell_effect_c = | | * static char *rcsid_spell_effect_c = |
* "$Id: spell_effect.c,v 1.78 2002/11/11 08:59:09 garbled Exp $"; | | * "$Id: spell_effect.c,v 1.79 2002/11/13 00:26:13 garbled Exp $"; |
*/ | | */ |
| | |
| | |
| | |
* spell_failure() handles the various effects for differing degrees | | * spell_failure() handles the various effects for differing degrees |
* of failure badness. | | * of failure badness. |
*/ | | */ |
#ifdef SPELL_FAILURE_EFFECTS | | |
| | |
/* Might be a better way to do this, but this should work */ | | /* Might be a better way to do this, but this should work */ |
#define ISQRT(val) ((int)sqrt((double) val)) | | #define ISQRT(val) ((int)sqrt((double) val)) |
| | |
void spell_failure(object *op, int failure,int power) | | void spell_failure(object *op, int failure,int power) |
{ | | { |
| | if (settings.spell_failure_effects == FALSE) |
| | return; |
| | |
if(failure<= -20&&failure > -40) /* wonder */ | | if(failure<= -20&&failure > -40) /* wonder */ |
{ | | { |
new_draw_info(NDI_UNIQUE, 0,op,"Your spell causes an unexpected effect."); | | new_draw_info(NDI_UNIQUE, 0,op,"Your spell causes an unexpected effect."); |
| | |
} | | } |
} | | } |
} | | } |
#endif | | |
| | |
/* Oct 95 - hacked on this to bring in cosmetic differences for MULTIPLE_GOD hack -b.t. */ | | /* Oct 95 - hacked on this to bring in cosmetic differences for MULTIPLE_GOD hack -b.t. */ |
| | |