print "${BGreen}Loading room.pl\n";    

$room_name = "none";
my $yellow_text = "none";
$prompt = "x/x";
$area = "x";

sub is_a_room {
  if ($yellow_text =~ /You see the trap (.*) set/) {
    return 0;
  }
  if ($yellow_text =~ /Hovering in the room is a large golden orb/) {
    return 0;
  }
  if ($yellow_text =~ /Surrounding the area is a shimmering shield/) {
    return 0;
  }
  return 1;
}

sub set_prompt {
	if(/\<(\d+)hp (\d+)m (\d+)mv (\d+)br\>/) {
		$prompt = "$1/$2"; }
}


sub record_room { 
  if (/$BYellow(.*)\xEA/) { 
    $yellow_text = $1;
  } 
  elsif (/Obvious exits:/) {
    if (is_a_room()) {
      $room_name = $yellow_text;
      chop($room_name);
      chop($room_name);
    }
  }
}

output_add(\&record_room);
output_add(\&set_prompt);
