 /*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  @+  .------------. .------------. .------..------. SOH (South OF HEAVEN)  @
  @ / |+- -         \|+- --        \|+-    ||      | +--------------------+ @
  @ | ||             |:             ||     ||      | The following code is  @
  @ | |:             |.             |:     ||      | created to function    @
  @ | |.      _______|  _____.      |.     ||      | primarily on SOH MUD   @
  @ | |              |      ||      |      ||      | tho it can be modified @
  @ | |______        |      ||      |      :|      | to work on most Diku,  @
  @ |/|+-    |       |      ||      |      .:      | Merc, Envy, ROM MUDs   @
  @ | |:     |       |      ||      |              | +--------------------+ @
  @ | |      |       |      ||      |       .      | All these functions    @
  @ | |      |       |      :|      |      :|      | by whiplash@armory.com @
  @ | |      |       |      .|      |      ||      | and may not be used    @
  @ | |      :       |       :      |      ||      | unless credit is given @
  @ | |              |              |      ||      | somewhere in your MUD  @
  @ | |______________|______________:______||______| that all can see.      @
  @ |/______________/_______________/_____//______/  (ie: HELP SOH, etc)    @
  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/


void do_taste( CHAR_DATA *ch, char *argument)
 {
 OBJ_DATA *obj;
 int which = 0;
 int liquid = 0;
 char *flavor;

 flavor = "Inform an Admin this is broken.";

if((obj = get_obj_here(ch,argument)) == NULL)
 {
  send_to_char("You don't have that.\n\r",ch);
  return;
 }

switch(obj->item_type)
 {
 default:
 send_to_char("Thats not something you'd want to put in your mouth.\n\r",ch);
 break;

 case ITEM_POTION:
 send_to_char("Potions cannot be tasted, you'll have to quaff it.\n\r",ch);
 break;

 case ITEM_FOOD:
 act("You take a small bite of $p.",ch,obj,NULL,TO_CHAR);
 act("$n takes a small bite of $p.",ch,obj,NULL,TO_ROOM);
 if(obj->value[3] != 0) /* poison */ 
  {
 which = number_range(1,3);
 if(which == 1) send_to_char("A bitter taste floods your mouth!\n\r",ch);
 else if(which == 2) send_to_char("An acidic taste fills your mouth!\n\r",ch);
   else send_to_char("A disgusting taste fills your mouth!\n\r",ch);
   act("$p is poisoned!",ch,obj,NULL,TO_CHAR);
   act("$n spits out a bite of poison $p!",ch,obj,NULL,TO_ROOM);
   return;
  }
 act("$p tastes fine to you.",ch,obj,NULL,TO_CHAR);
 break;

 case ITEM_DRINK_CON: case ITEM_FOUNTAIN: /* this one is a bit tougher. */
 if(obj->value[1] <= 1)
 {
  send_to_char("There's nothing in that to taste.\n\r",ch);
  return;
 }
 liquid = obj->value[2];
 act("You take a sip of $T from $p.",ch,obj,liq_table[liquid].liq_name,TO_CHAR);
 act("$n takes a sip of $T from $p.",ch,obj,liq_table[liquid].liq_name,TO_ROOM);
 if(obj->value[3] != 0)
 {
 which = number_range(1,5);
 switch(which)
 {
 case 1: flavor = "bitter";  break;
 case 2: flavor = "acidic";  break;
 case 3: flavor = "spoiled"; break;
 case 4: flavor = "rotten";  break; 
 case 5: flavor = "tart";    break;
 default: break;
 }
 printf_to_char(ch,"The %s has a %s flavor to it.",
                    liq_table[liquid].liq_name,flavor);
 return;
 }
act("$p tastes fine to you.",ch,obj,NULL,TO_CHAR);
break;

 }
return;
}

