version 1.60 | | version 1.61 |
---|
| | |
/* | | /* |
* static char *rcsid_skills_c = | | * static char *rcsid_skills_c = |
* "$Id: skills.c,v 1.60 2005/07/26 00:23:00 akirschbaum Exp $"; | | * "$Id: skills.c,v 1.61 2005/07/27 17:54:54 ryo_saeba Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
"You need a spell readied in order to inscribe!"); | | "You need a spell readied in order to inscribe!"); |
return 0; | | return 0; |
} | | } |
if(chosen_spell->stats.grace > pl->stats.grace) { | | if(SP_level_spellpoint_cost(pl,chosen_spell,SPELL_GRACE) > pl->stats.grace) { |
new_draw_info_format(NDI_UNIQUE,0,pl, | | new_draw_info_format(NDI_UNIQUE,0,pl, |
"You don't have enough grace to write a scroll of %s.", | | "You don't have enough grace to write a scroll of %s.", |
chosen_spell->name); | | chosen_spell->name); |
return 0; | | return 0; |
} | | } |
if(chosen_spell->stats.sp > pl->stats.sp) { | | if(SP_level_spellpoint_cost(pl,chosen_spell,SPELL_MANA) > pl->stats.sp) { |
new_draw_info_format(NDI_UNIQUE,0,pl, | | new_draw_info_format(NDI_UNIQUE,0,pl, |
"You don't have enough mana to write a scroll of %s.", | | "You don't have enough mana to write a scroll of %s.", |
chosen_spell->name); | | chosen_spell->name); |
| | |
if(QUERY_FLAG(pl,FLAG_CONFUSED)) confused = 1; | | if(QUERY_FLAG(pl,FLAG_CONFUSED)) confused = 1; |
| | |
/* Lost mana/grace no matter what */ | | /* Lost mana/grace no matter what */ |
pl->stats.grace-=chosen_spell->stats.grace; | | pl->stats.grace-=SP_level_spellpoint_cost(pl,chosen_spell,SPELL_GRACE); |
pl->stats.sp-=chosen_spell->stats.sp; | | pl->stats.sp-=SP_level_spellpoint_cost(pl,chosen_spell,SPELL_MANA); |
| | |
if (random_roll(0, chosen_spell->level*4-1, pl, PREFER_LOW) < skill->level) { | | if (random_roll(0, chosen_spell->level*4-1, pl, PREFER_LOW) < skill->level) { |
if (scroll->nrof > 1) { | | if (scroll->nrof > 1) { |