1
0
mirror of https://github.com/blupi-games/planetblupi synced 2024-12-30 10:15:36 +01:00

Hide enemies (under fog) from stat with the difficult skill level

It concerns issue #22.
This commit is contained in:
Mathieu Schroeter 2017-09-22 12:44:07 +02:00
parent 8a9849c27e
commit 74ba9ea8f8

View File

@ -472,6 +472,17 @@ CDecor::StatisticUpdate ()
}
if (m_blupi[rank].perso == 8) // disciple ?
table_statistic[STATDISCIPLE].nb++;
// Hide enemies from the stat when hidden by the fog
if (this->GetSkill () >= 1)
{
auto fogCel = m_blupi[rank].cel;
fogCel.x = (fogCel.x / 4) * 4;
fogCel.y = (fogCel.y / 4) * 4;
if (m_decor[fogCel.x / 2][fogCel.y / 2].fog == FOGHIDE) // hidden?
continue;
}
if (m_blupi[rank].perso == 4) // robot ?
{
table_statistic[STATROBOT].nb++;