/
lib/banish/
lib/d/
lib/doc/
lib/doc/domains/
lib/doc/efun/
lib/doc/examples/
lib/doc/examples/armour/
lib/doc/examples/contain/
lib/doc/examples/food/
lib/doc/examples/magic/
lib/doc/examples/monster/
lib/doc/examples/room/
lib/doc/examples/weapons/
lib/function/
lib/include/
lib/include/fn_specs/
lib/include/skills/
lib/info/
lib/inherit/base/
lib/log/
lib/manuals/312/
lib/news/
lib/obj/party/
lib/objects/components/
lib/open/
lib/open/library/
lib/open/party/
lib/players/
lib/players/zilanthius/
lib/room/
lib/room/city/arena/
lib/room/city/creator/
lib/room/city/garden/monst/
lib/room/city/obj/
lib/room/city/shop/
lib/room/death/
lib/room/registry/
lib/secure/
lib/secure/UDP_CMD_DIR/
lib/skills/
lib/skills/fighter/
lib/skills/thief/
lib/usr/
lib/usr/creators/
lib/usr/players/
/* create food, create water */

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

status create(string spell_type, mixed alt_type) {
  int heal;

  if(!alt_type) alt_type = "nature_sphere";
  heal = (objectp(alt_type))
       ? (int)alt_type->query_cast_level()
       : (int)this_player()->query(alt_type);

  switch(spell_type) {
    case "food":
      this_player()->load_spell(({
       "target",            this_player(),
       "name",              "Create Food",
       "sphere",            alt_type, 
       "damage",            heal,
       "cost",              8,
       "level",             8, /* 16 + 4 (no component) - 12 cast time */
       "cast time",         4,
       "spell object",      "skills/obj/sp_food",
       "casting msg", ({
         "You feel magical energies flow around you.\n",
         "You sense them gathering before you.\n",
         "The magic begins to coalesce before your eyes.\n",
       }),
       "casting msg room", ({ 
         "You feel magical energies flow around "+NAME+".\n",
         "You sense them gathering before "+NAME+".\n",
         "The magic coalesces before "+NAME+".\n",
       }),
       "passive",
      }));
    break;

    case "water":
      this_player()->load_spell(({
       "target",            this_player(),
       "name",              "Create Water",
       "sphere",            alt_type, 
       "damage",            heal,
       "cost",              8,
       "level",             8, /* 16 - 12 cast time + 4 since get compon. */
       "cast time",         4,
       "spell object",      "skills/obj/sp_water",
       "component",         "empty bottle#empty tankard#empty barrel#"+
                            "empty bowl#bottle#tankard#barrel#bowl",
       "passive",
       "casting msg", ({
         "You feel magical energies flow around you.\n",
         "You sense them draining the water from the air around you.\n",
         "The magic begins to coalesce before your eyes.\n",
       }),
       "casting msg room", ({ 
         "You feel magical energies flow around "+NAME+".\n",
         "You sense them draining the water from the air around "+NAME+".\n",
         "The magic coalesces before "+NAME+".\n",
       }),
      }));
    break;

    default:
      notify_fail("create water, create food?\n");
      return 0;
    break;
  }
  return 1;
}

/* Native Mode Move */

#include <move.h>