package Texas;

public class Evil extends Humans {
  String mustachColor, hatColor, look ;
  int drunkness, numberOfDamsels ;
  Humans damsel ;
  Horse myHorse ;
  public Evil() {
    look = "Mean" ;
    drunkness = 0 ;
    numberOfDamsels = 0 ;
  }
  public void setHatColor(String hatColor) {
    this.hatColor=hatColor;
  }
  public void setMustachColor(String musColor) {
    mustachColor=musColor;
  }
  public void drinkWhiskey() throws Exception {
    if(drunkness>15) {
      throw new Exception("drank too much");
    }
    else {
      drunkness++ ;
    }
  }
  public int howDrunkAmI() { return drunkness ; }
  public String tieUpDamsel(Humans damsel) {
    this.damsel = damsel ;
    numberOfDamsels++ ;
    return ("The Evil tied " + damsel.whatIsYourName()) ;
  }
  public String shootHorse(Horse horsename) throws Exception {
// succeed to shoot only if the horse name is "Hoysa"
    if(horsename.name!="Hoysa") {
      throw new Exception("wrong horse buddy");
    }
    else {
      if(horsename.howManyLegs()>0) {
        horsename.decreaseLeg();
      }
      return ("The Evil shot "+horsename.whatIsYourName());
    }
  }   
}