Re: [CODE] Multi-cast?:>

From: Daniel Koepke (dkoepke@california.com)
Date: 01/23/99


>         Ok awhile back I wrote on here asking if anyone had ever
> implemented a multi-casting system so that a mage could cast more than one
> fireball or any other damge spell in one round.  I got a reply back saying
> to look at the multi-hit code, so thats what I did.  Suggestions very
> welcome and so is criticism:>  Laterz

Not a bad idea, at all.  I must have missed your original request (not
surprising, since sometimes I fall behind on e-mail and mass delete stuff
from this list).  It's not a bad adaptation of my (I think?) multiple
attacks per round code.

Another alternative is to make the spells different for higher-levels,
something like implementing power levels for the spells.  This would
entail new messages, which might overcomplicate things if you're just
looking for a quick hack.  But I think something along the lines of,

  Magic Missile: 25% > cast magic missile at bob
  You watch with satisfaction as your magic missile connects with Bob.

  Magic Missile: 50% > cast magic missile at bob
  You launch a plethorea of magic missiles at Bob, watching them explode
  against him in rapid succession.

  Magic Missile: 100% > cast magic missile at bob
  You unleash a flurry of magic missiles on Bob, sending him reeling
  backwards, blinded by the strobing impacts.

Just up the damage and the chance of impact, and it'll match your
specifications fairly well.  This also gives more incentive to your mages
for keeping up with those old spells.  Maybe 'magic missile' at 100% is
better than 'fireball' at 25%?

Oh, as for the "cast spell [at X]" thing rather than the magical single
quotes approach, something along the lines of the following will work,

  char spell[512], victim[512];

  if (!strstr(argument, " at ")) {
    /* we don't have a victim specified */
  } else {
    strcpy(victim, strstr(argument, " at ") + 4);
    strncpy(spell, argument, strlen(buf) - strlen(victim) - 4);
  }

so that 'spell' is the name of the spell before the 'at', and 'victim' is
the text supplied after victim.

This code is released under the MCGPL (Mailer Code(tm) General Public
License).  As always, it's without any guarantees or warranties.  Like
beta software (especially from Micro$oft), it may cause your computer to
crash arbitrarily, turn it into a Jell-o pudding snack, or cause a
hurricane in Taiwan.  In essence, it's not my fault if it doesn't work.

-dak : Really striving to create a new running gag, since crystal balls
       haven't come up recently.  (We'll ignore any euphemisms hiding in
       that last sentence...)


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST