version 1.12 | | version 1.13 |
---|
| | |
/* | | /* |
* static char *rcsid_skills_c = | | * static char *rcsid_skills_c = |
* "$Id: skills.c,v 1.12 2001/03/21 06:14:24 mwedel Exp $"; | | * "$Id: skills.c,v 1.13 2001/04/08 05:18:16 mwedel Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
spells[chosen_spell].name); | | spells[chosen_spell].name); |
return 0; | | return 0; |
} | | } |
if(spells[chosen_spell].sp>pl->stats.sp) { | | if(spells[chosen_spell].cleric && spells[chosen_spell].sp>pl->stats.grace) { |
new_draw_info_format(NDI_UNIQUE,0,pl, | | new_draw_info_format(NDI_UNIQUE,0,pl, |
"You don't have enough spell points to write a scroll of %s." | | "You don't have enough grace to write a scroll of %s." |
| | ,spells[chosen_spell].name); |
| | return 0; |
| | } |
| | else if(spells[chosen_spell].sp>pl->stats.sp) { |
| | new_draw_info_format(NDI_UNIQUE,0,pl, |
| | "You don't have enough mana to write a scroll of %s." |
,spells[chosen_spell].name); | | ,spells[chosen_spell].name); |
return 0; | | return 0; |
} | | } |
| | |
/* ok, we are ready to try inscription */ | | /* ok, we are ready to try inscription */ |
| | |
if(QUERY_FLAG(pl,FLAG_CONFUSED)) confused = 1; | | if(QUERY_FLAG(pl,FLAG_CONFUSED)) confused = 1; |
pl->stats.sp-=spells[chosen_spell].sp; /* lose sp no matter what */ | | |
| | /* Lost mana/grace no matter what */ |
| | if (spells[chosen_spell].cleric) |
| | pl->stats.grace-=spells[chosen_spell].sp; |
| | else |
| | pl->stats.sp-=spells[chosen_spell].sp; |
| | |
if ((RANDOM()%(spells[chosen_spell].level*4))< SK_level(pl)) { | | if ((RANDOM()%(spells[chosen_spell].level*4))< SK_level(pl)) { |
newScroll = get_object(); | | newScroll = get_object(); |