#charset "us-ascii"
#include <adv3.h>
#include <en_us.h>
#include <charset.h>
#include "AHA.h"

class BodyPart: Component
  meetObjHeld { return true; }
  dobjFor(Examine)
  {
    verify() { logicalRank(65, 'bodypart'); }
  }
;

class Hand : BodyPart
  iobjFor(TakeWith) remapTo(Take, DirectObject)
  iobjFor(AttackWith) remapTo(Attack, DirectObject)
  iobjFor(PutIn) remapTo(Take, DirectObject)
  iobjFor(CleanWith) remapTo(Clean, DirectObject)
  iobjFor(MoveWith) remapTo(Move, DirectObject)
  iobjFor(TurnWith) remapTo(Turn, DirectObject)
  isQualifiedName = true
;

Hand 'right hand*hands' 'your bare right hand' @me
    collectiveGroup = handGroup
;

Hand 'left hand*hands' 'your bare left hand' @me
    collectiveGroup = handGroup
;

handGroup: CollectiveGroup, Hand 'your my bare *hands' 'your hands' @me
  isCollectiveAction(action, whichObj)
  {
    if(whichObj == IndirectObject && action.baseActionClass
       is in (TakeWithAction, AttackWithAction, PutInAction, CleanWithAction,
        MoveWithAction, TurnWithAction) )
       return true;
    
    return inherited(action, whichObj);
  }    
;

class Eye: BodyPart
  desc = "You don't have a mirror. "
  isQualifiedName = true
  uselessToAttackMsg = 'You have no desire to damage {it dobj/him}. '
  cannotKissMsg = 'You\'d have to be quite a contortionist to get
   your lips to {the dobj/him}. '
   notAContainerMsg = 'It\'s a bad idea to put things in your eyes. '
;

Eye 'right eye*eyes' 'your right eye' @me
  collectiveGroup = eyeGroup
;

Eye 'left eye*eyes' 'your left eye' @me
  collectiveGroup = eyeGroup
;

eyeGroup : CollectiveGroup, Eye 'your my *eyes' 'your eyes' @me
  isCollectiveAction(action, whichObj)
  {
    if(whichObj == IndirectObject && action.baseActionClass
       is in (PutInAction) )
       return true;
    
    return inherited(action, whichObj);
  }
;