Re: [Question] Casting a spell

From: Michael Gallagher (
Date: 01/26/01

I still don't understand why you can't do the number(1, 101); inside
MANUAL_SPELL(). Make it that the spell doesn't fail untill you get inside
MANUAL_SPELL(). Then you could do different failure reasons for each spell
and they would be defined in each spell.

(this is from memory of what a manual spell looks like)

int prob;

if (ch == NULL | victim == NULL)

prob = number(1, 101);

if ((prob + GET_STR(victim)) > (GET_STR(ch) + GET_HITROLL(ch)) {
  send_to_char("spell fail message.\r\n", ch);

/* Rest of spell code goes here */


Is this what you want to do? There's really little need to pass anything.
Obviously you'll need to put in individual checks for
each spell, but isn't that what you wanted to do?

Get Your Private, Free E-mail from MSN Hotmail at

   | FAQ: |
   | Archives: |

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