mirror of
https://github.com/vcmi/vcmi.git
synced 2025-04-13 11:40:38 +02:00
Quick fix for https://bugs.vcmi.eu/view.php?id=3041
This commit is contained in:
parent
fa39279c82
commit
dd046e60be
@ -44,6 +44,9 @@ TSubgoal AdventureSpellCast::whatToDoToAchieve()
|
|||||||
if(hero->mana < hero->getSpellCost(spell))
|
if(hero->mana < hero->getSpellCost(spell))
|
||||||
throw cannotFulfillGoalException("Hero has not enough mana to cast " + spell->name);
|
throw cannotFulfillGoalException("Hero has not enough mana to cast " + spell->name);
|
||||||
|
|
||||||
|
if(spellID == SpellID::TOWN_PORTAL && town && town->visitingHero)
|
||||||
|
throw cannotFulfillGoalException("The town is already occupied by " + town->visitingHero->name);
|
||||||
|
|
||||||
return iAmElementar();
|
return iAmElementar();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user