#!/mit/perl5/bin/perl -w

use strict;

open(IN, "log-ayamiss-all-060702.txt") || die "crap.\n";
my $hp=0;
my $last;
my @log;
my $min=-1;
my $max=-1;
while(<IN>) {
    if (/Hive\'Zara Larva for (\d+)/) {
	$hp+=$1;
	$last=$1;
    } elsif (/Hive\'Zara Larva dies/) {
	if ($min==-1) {
	    $min=$hp-$last;
	    $max=$hp;
	} else {
	    if ($min < ($hp-$last)) {
		$min=$hp-$last;
	    }
	    if ($max > $hp) {
		$max=$hp;
	    }
	}
	$hp=0;
    }
}
close(IN);
print "min: $min\tmax: $max\n";
