Fix 1994352: Buggy message after an invisible monster blocks an attack.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5847 c06c8d41-db1a-0410-9941-cceddc491573
CQ2PQIN6JJWUDKW46Z6S4ZD5HZYFUEBSCG7LTRYQZXAW5YNUWYJQC
XXUOHQJZC3ODB7UMS5FMYAOXEAJK5TRYPVFRQYHK4OZ2DZVP6ARAC
R22TTMI6WXWULC7ODKFF3QCB7MOTETQQ6IR4BUCUPOCQKQNCTT5AC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
LI5EGLV445DLIC6QDNQSGGJUPE42FK3BTNKP4ZT72WHSQY5JQHFQC
PFDWNTN3NEZCP6NKPIM2FK3KRVDBQUCGIAWWOU2DJVS4KWWJLYYAC
QDTVLBRGHDTRUVT7I3O72K6TMOYAUSAJBZUHGOEFU2RKJNUPWZSQC
DWSABP6YFM2CCMO7NVGGBWVCPAXOXOT5VQ6SADR4M66LHW66AP6QC
CKY7MRFWMNHXIPJD5ZUAJN5T2YHUIEAYBNYYV5GN74LBZJRDJMEQC
// Remove trailing spaces.
for (int i = strlen(buf) - 1; i >= 0; i++)
{
if (isspace( buf[i] ))
buf[i] = 0;
else
break;
}
help = buf;
// Give up if you encountered the second set of underliners
// and still haven't found Highlights.
if (help.find("---") != std::string::npos)
if (isspace( buf[i] ))
buf[i] = 0;
else
break;
}
help = buf;
// Give up if you encountered the second set of underliners
// and still haven't found Highlights.
if (help.find("---") != std::string::npos)
{
if (skip_lines)
}
else
{
result += buf;
result += EOL;
}
}
if (help.find("Highlights") != std::string::npos)
{
// Highlight the Highlights, so to speak.
std::string text = "<w>";
text += buf;
text += "</w>";
text += EOL;
result += text;
// And start printing from now on.
start = true;
}
else if (!start)
continue;
else if (buf[0] == 0)
{
// Stop reading and copying text with the first empty line
// following the Highlights section.
break;
}
else
{
result += buf;
result += EOL;