/
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/
/*** This file checks all types of functions for spells
     'Hold' -  Hold spells stop the caster from moving, and hence spoil spells.
  'Silence' -  Silence spells stop the verbal components (speaking bits) of
               a spell and thus, can stop it from being cast.
 'Nulmagic' -  Areas that are resistant to magic cannot have magic cast in them

 ***/

int check_spells(string str) {
    object obj;

    if(str == "hold" || str == "Hold") {
       if(present("Hold", environment(this_player())) ||
          present("Hold", this_player())) {
          tell_object(this_player(),
          "You attempt to move, yet some force stops you.\n");
          return 1;
       }
       return 0;
    }

    if(str == "silence" || str == "Silence") {
       if(present("Silence", environment(this_player())) ||
          environment(this_player())->query_prop("silence") ||
          present("Silence", this_player())) {
          tell_object(this_player(),
          "You utter the words of the spell, yet no sounds come from your "+
          "lips.\n");
       return 1;
       }
       return 0;
    }

    if(str == "nulmagic" || str == "Nulmagic") {
       if(present("Nulmagic", environment(this_player())) ||
          present("Nulmagic", this_player()) ||
          environment(this_player())->query_prop("nulmagic") ||
          environment(this_player())->query_prop("Nulmagic") ||
          environment(this_player())->query_nulmagic()) {
          write("Your spell fails...as if resisted by the very air around "+
          "you.\n");
          return 1;
       }
     return 0;
    }

return 0;
}