package uk.co.patrickhaston.mars;

public class MarsMyStatement extends MarsData 
{
  public int choice;  
  // The id of the selection list (MarsChoice) which this statement appears on
  public String response;
  // The response type that this statement generates
  public int moodImpactD;
  // The impact that this statement will have on the mood of D type personalities
  public int moodImpactI;
  // The impact that this statement will have on the mood of I type personalities
  public int moodImpactC;
  // The impact that this statement will have on the mood of C type personalities
  public int moodImpactS;
  // The impact that this statement will have on the mood of S type personalities
  public String theText;
  // The statement itself.
  protected int special;
  // This is used to record the id of the construction type or technology that
  // is indicated by selecting this statement.
  
  public MarsMyStatement(int id)
  {
    super(id);
    choice = 0;
    response = "";
    moodImpactD = 0;
    moodImpactI = 0;
    moodImpactC = 0;
    moodImpactS = 0;
    theText = "";
  }

  public MarsMyStatement(MarsMyStatement s)
  {
    super(s);
    if (s != null)
    {
      choice = s.choice;
      response = s.response;
      moodImpactD = s.moodImpactD;
      moodImpactI = s.moodImpactI;
      moodImpactC = s.moodImpactC;
      moodImpactS = s.moodImpactS;
      theText = s.theText;
    }
    else
    {
      choice = 0;
      response = "";
      moodImpactD = 0;
      moodImpactI = 0;
      moodImpactC = 0;
      moodImpactS = 0;
      theText = "";
    }
  }
  
  public MarsMyStatement(String line)
  {
    super(line);
    choice = readInteger(line, 0);
    response = readString(line, 1);
    moodImpactD = readInteger(line, 2);
    moodImpactI= readInteger(line, 3);
    moodImpactC = readInteger(line, 4);
    moodImpactS = readInteger(line, 5);
    theText = readString(line, 6);
  }

  public String toString()
  {
    // This is used to display the entry if the class is attached to a combo-box
    return theText;
  }
  
  public int getSpecial()
  {
    return special;
  }
  
  public void setSpecial(int s)
  {
    special = s;
  }

}
