mirror of
https://github.com/vcmi/vcmi.git
synced 2025-09-16 09:26:28 +02:00
don't add Necromancy to Witch Hut on random maps
This commit is contained in:
@@ -1452,8 +1452,10 @@ void CGWitchHut::initObj(CRandomGenerator & rand)
|
||||
{
|
||||
if (allowedAbilities.empty()) //this can happen for RMG. regular maps load abilities from map file
|
||||
{
|
||||
// Necromancy can't be learned on random maps
|
||||
for(int i = 0; i < VLC->skillh->size(); i++)
|
||||
allowedAbilities.push_back(i);
|
||||
if(VLC->skillh->getByIndex(i)->getId() != SecondarySkill::NECROMANCY)
|
||||
allowedAbilities.push_back(i);
|
||||
}
|
||||
ability = *RandomGeneratorUtil::nextItem(allowedAbilities, rand);
|
||||
}
|
||||
|
Reference in New Issue
Block a user