1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-04-07 07:10:04 +02:00

#3788 - fix passing wirlpool with only commander alive

This commit is contained in:
Andrii Danylchenko 2024-04-20 15:26:25 +03:00
parent 70fad45316
commit ae69311023

View File

@ -709,7 +709,8 @@ void CGWhirlpool::teleportDialogAnswered(const CGHeroInstance *hero, ui32 answer
bool CGWhirlpool::isProtected(const CGHeroInstance * h)
{
return h->hasBonusOfType(BonusType::WHIRLPOOL_PROTECTION)
|| (h->stacksCount() == 1 && h->Slots().begin()->second->count == 1);
|| (h->stacksCount() == 1 && h->Slots().begin()->second->count == 1)
|| (h->stacksCount() == 0 && h->commander && h->commander->alive);
}
ArtifactID CGArtifact::getArtifact() const