/
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/
/***  Marriage - alain  ***/

#define ENV    environment
#define NAME   (string)this_player()->query_name()
#define TP     this_player()
#define CAP    capitalize

 
status marry(string str) { 
  string name1, name2; 
  object player1, player2; 
  object wedding_ring; 
 

  if(!str || sscanf(str, "%s and %s", name1, name2) != 2) {
    notify_fail("marry <man> and <wife>?\n");
    return 0; 
  }
  if(this_player()->query_level() < 20) {
    write("You need to be of higher status within the church.\n");
    return 1;
  }
  player1 = present(name1, ENV(TP)); 
  player2 = present(name2, ENV(TP)); 
 
  if(!player1) { 
    write(CAP(name1)+" is not here.\n"); 
    return 1; 
  } 
  if(!player2) { 
    write(CAP(name2)+" is not here.\n"); 
    return 1;
  } 
  if((int)player1->query_gender() == (int)player2->query_gender()){ 
    write("You cannot marry two players of the same sex!\n"); 
    return 1; 
  } 
  if(player1->query_npc()) { 
    write("But "+CAP(name1)+" is not a player!\n"); 
    return 1; 
  } 
  if(player2->query_npc()) { 
    write("But "+CAP(name2)+" is not a player!\n"); 
    return 1; 
  } 
  if(player1->query_spouse()) { 
    write("But "+CAP(name1)+" is already married!\n"); 
    return 1;  
  } 
  if(player2->query_spouse()) { 
    write("But "+CAP(name2)+" is already married!\n"); 
    return 1; 
  } 
  player1 -> set_spouse(CAP(name2)); 
  player2 -> set_spouse(CAP(name1)); 
  write("You marry "+CAP(name1)+" and "+CAP(name2)+".\n");
  say(NAME +" marries "+ CAP(name1) +" and "+ CAP(name2) +"\n");
  wedding_ring = clone_object("/players/alain/marriage/ring");
  move_object(wedding_ring, player1); 
  wedding_ring = clone_object("/players/alain/marriage/ring");
  move_object(wedding_ring, player2); 
  player1->check_shout("The heavens rejoice in the union of "+
    CAP(name1) +" and "+ CAP(name2) +" !\n");     
  return 1; 
} 

/* Native Mode Move */

#include <move.h>