/
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/
/* goodberry */

inherit "inherit/food";

reset(arg) {
  ::reset(arg);
  if(arg) return;
  set_name("goodberry");
  set_alias("berry");
  set_short("Goodberry");
  set_long("This small berry is glowing red. It looks really juicy.\n"+ 
           "You can't wait to eat it.\n");
  set_weight(1);
  set_strength(3 * (random(4)+1));
  /* 3 - 12 hp of healing */
}

init(){
  ::init();
  add_action("put","put");
}

status put(string str){
  object ob;
  string bottle;
  int strength;

  if(str && sscanf(str,"goodberry in %s",bottle) == 1){
    if((ob = present(bottle, this_player()))) {
      if(ob->query_alco_drink() || ob->query_soft_drink()){
        write("The berry starts to ferment!\n");
        if(ob->query_full()){
          write("You fortify the "+(string)ob->query_name()+"!\n");
          say((string)this_player()->query_name()+" adds a berry to the "+
              (string)ob->query_name()+"!\n");
          strength = (int)ob->query_strength();
        }
        destruct(ob);
        ob = clone_object("inherit/alco_drink");
        ob->set_name("goodberry liquor");
        ob->set_alt_name("liquor");
        ob->set_short("Goodberry Liquor");
        ob->set_long("This is an attempt at moonshining some "+
                     "Berry Liquor!\n");
        ob->set_strength(strength+8+random(8));
        move_object(ob,this_player());
        destruct(this_object());
        return 1;
      }        
    }
  }
  return 0;
}

query_domain_safe() { return 1; }


status cast_spell(object caster,object target,object prev,int dmg) {
  write("You change the berry into a Goodberry.\n");  
  say("The berry "+ caster->query_name() 
     +" is holding begins to glow softly.\n");   
  return 1;  
}  

/* Native Mode Move */

#include <move.h>