coc.c

./lib/skills/mage/coc.c · 1.3 KB

From the archive h7v3.0a.tar.gz

Download the archive   « Back to the archive contents

/** CONE OF COLD  **/

#define NAME "@@query_name:$this_player()$@@"  /* gives greater flexibilty */
#define TARG "@@query_name:$this_object()$@@"


status coc(mixed targ, mixed alt_type) {
  int dam;

  if(!alt_type) alt_type = "evocation";
  dam = (objectp(alt_type))
      ? (int)alt_type->query_cast_level() /* wands */
      : (int)call_other(this_player(),"query_"+alt_type);
  dam *= (random(5) + 1);
  if(dam > 40) dam = 40;  

  this_player()->load_spell(({
  "target",            targ,
  "name",              "Cone of Cold",
  "sphere",            alt_type, 
  "cost",              10,
  "damage",            dam,
  "immune",            "cold",
  "level",             10,
  "cast time",         1,
  "msg target",       "Ice flies from "+ NAME +"'s hands, smiting you, "+
                      "freezing you cold!\n",
  "msg room",         "Ice flies from "+ NAME +"'s hands, smiting "+ TARG +
                      ", freezing it cold!\n",
  "msg caster",       "Ice flies from your hands smiting "+ TARG +
                      ", freezing it cold.\n",
/* other spell options...
  "area",
  "spell object",     0, 
  "casting msg",      0,
  "casting msg room", 0,
  "passive",
  "component",        0,
 */
  }));
  return 1;
}

/* Native Mode Move */

#include <move.h>

Site Stats

Snippets: 1791
Codebases: 571