version 1.45 | | version 1.46 |
---|
| | |
/* | | /* |
* static char *rcsid_apply_c = | | * static char *rcsid_apply_c = |
* "$Id: apply.c,v 1.45 2001/09/03 06:44:55 mwedel Exp $"; | | * "$Id: apply.c,v 1.46 2001/09/26 21:34:08 garbled Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
*/ | | */ |
if(QUERY_FLAG(op,FLAG_CONFUSED)) { | | if(QUERY_FLAG(op,FLAG_CONFUSED)) { |
new_draw_info(NDI_UNIQUE,0,op,"In your confused state you flub the wording of the text!"); | | new_draw_info(NDI_UNIQUE,0,op,"In your confused state you flub the wording of the text!"); |
scroll_failure(op,RANDOM()%(spells[tmp->stats.sp].level+1),spells[tmp->stats.sp].sp); | | /* this needs to be a - number [garbled] */ |
} else if(QUERY_FLAG(tmp,FLAG_STARTEQUIP) || RANDOM()%150-(2*SK_level(op)) < | | scroll_failure(op, 0 - random_roll(0, spells[tmp->stats.sp].level, op, PREFER_LOW), spells[tmp->stats.sp].sp); |
| | } else if(QUERY_FLAG(tmp,FLAG_STARTEQUIP) || random_roll(0, 149, op, PREFER_LOW)-(2*SK_level(op)) < |
learn_spell[spells[tmp->stats.sp].cleric ? op->stats.Wis : op->stats.Int]) { | | learn_spell[spells[tmp->stats.sp].cleric ? op->stats.Wis : op->stats.Int]) { |
new_draw_info(NDI_UNIQUE, 0,op,"You succeed in learning the spell!"); | | new_draw_info(NDI_UNIQUE, 0,op,"You succeed in learning the spell!"); |
do_learn_spell (op, tmp->stats.sp, 0); | | do_learn_spell (op, tmp->stats.sp, 0); |
| | |
else if (failure <= -15&&failure > -35) /* drain mana */ | | else if (failure <= -15&&failure > -35) /* drain mana */ |
{ | | { |
new_draw_info(NDI_UNIQUE, 0,op,"Your mana is drained!."); | | new_draw_info(NDI_UNIQUE, 0,op,"Your mana is drained!."); |
op->stats.sp -= RANDOM()%power; | | op->stats.sp -= random_roll(0, power-1, op, PREFER_LOW); |
if(op->stats.sp<0) op->stats.sp = 0; | | if(op->stats.sp<0) op->stats.sp = 0; |
} | | } |
| | |