version 1.80 | | version 1.81 |
---|
| | |
/* | | /* |
* static char *rcsid_spell_effect_c = | | * static char *rcsid_spell_effect_c = |
* "$Id: spell_effect.c,v 1.80 2002/11/14 01:08:57 garbled Exp $"; | | * "$Id: spell_effect.c,v 1.81 2002/11/26 07:57:17 garbled Exp $"; |
*/ | | */ |
| | |
| | |
| | |
value *= 0.9; | | value *= 0.9; |
| | |
if ((obj->value>0) && rndm(0, 29)) { | | if ((obj->value>0) && rndm(0, 29)) { |
#ifdef LOSSY_ALCHEMY | | |
int tmp = (value % large->value) / small->value; | | |
| | |
*large_nuggets += value/ large->value; | | |
if (tmp) | | |
*small_nuggets += rndm(1, tmp); | | |
#else | | |
static int value_store; | | static int value_store; |
int count; | | int count; |
value_store += value; | | value_store += value; |
| | |
*small_nuggets += count; | | *small_nuggets += count; |
value_store -= count * small->value; | | value_store -= count * small->value; |
/* LOG(llevDebug, "alchemize value %d, remainder %d\n", value, value_store); */ | | /* LOG(llevDebug, "alchemize value %d, remainder %d\n", value, value_store); */ |
#endif | | |
} | | } |
| | |
/* Turn 25 small nuggets into 1 large nugget. If the value | | /* Turn 25 small nuggets into 1 large nugget. If the value |