Miscellany
public text v1 · immutable<?php
$sb = false;
$crushings = 0;
$cl = file('attempt2.txt');
foreach($cl as $line)
{
if(strpos($line, 'Drowe gains Shield Block.'))
{
$sb = true;
}
else if(strpos($line, 'Shield Block fades from Drowe.'))
{
$sb = false;
}
else if(preg_match('/Bloodlord Mandokir hits Drowe for [0-9]*\. \(crushing\)/',$line))
{
if($sb)
{
$crushings++;
echo $line;
}
}
}
echo $crushings;
?>