Re: [Question] Casting a spell

From: The Merciless Lord of Everything (
Date: 01/26/01

On Fri, 26 Jan 2001, Andrej Kacian wrote:

> generic 'You lost your concentration' message and move handling of
> success/failure into spell body..
I am curious as to why you would like this? Then you'll have a "Check if
you fail the spell" for each spell, would be rather inefficient, of
course the call could just be made to look something like this:

int fail_skill(struct char_data * ch, int skill)
   if (((GET_WIS(ch)*4 + GET_INT(ch))*4 /2 ) < Number(1, 101)) {
     return FALSE;
// Here you can insert even more conditions if you like..
// ie
// } else if (GET_SKILL(ch, skill) < number(1,101)) {
//   return FALSE;
   } else {
     return TRUE;

Then call it from the skill/spell you wish to call it from:
if (fail_skill(ch, spell)) {
  // Do whatever you want to do here

But what about spells that aren't manual? mag_damage, mag_area, mag_group
etc type spells? (Perhaps I missed something in the thread :).


   | FAQ: |
   | Archives: |

This archive was generated by hypermail 2b30 : 12/03/01 PST