diff --git a/hch/CObjectHandler.cpp b/hch/CObjectHandler.cpp index 442a6bafb..d8b809246 100644 --- a/hch/CObjectHandler.cpp +++ b/hch/CObjectHandler.cpp @@ -1555,6 +1555,10 @@ int CGTownInstance::creatureGrowth(const int & level) const case 2: ret*=(1.5); break; } + if(tempOwner != NEUTRAL_PLAYER) + { + ret *= (1 + cb->gameState()->players[tempOwner].valOfBonuses(Bonus::CREATURE_GROWTH_PERCENT)/100); //Statue of Legion + } if(getHordeLevel(0)==level) if((builtBuildings.find(18)!=builtBuildings.end()) || (builtBuildings.find(19)!=builtBuildings.end())) ret+=VLC->creh->creatures[town->basicCreatures[level]]->hordeGrowth; @@ -4525,7 +4529,7 @@ void CGShrine::onHeroVisit( const CGHeroInstance * h ) const { std::set spells; spells.insert(spell); - cb->changeSpells(h->id,true,spells); + cb->changeSpells(h->id, true, spells); iw.components.push_back(Component(Component::SPELL,spell,0,0)); } @@ -5450,7 +5454,7 @@ void CGMagi::onHeroVisit(const CGHeroInstance * h) const { const CGObjectInstance *eye = cb->getObj(*it); - cb->getTilesInRange (fw.tiles, eye->pos, 5, h->tempOwner, 1); + cb->getTilesInRange (fw.tiles, eye->pos, 10, h->tempOwner, 1); cb->sendAndApply(&fw); cv.pos = eye->pos; cv.focusTime = 2000; diff --git a/lib/IGameCallback.cpp b/lib/IGameCallback.cpp index 23b633a81..c7b104aef 100644 --- a/lib/IGameCallback.cpp +++ b/lib/IGameCallback.cpp @@ -185,6 +185,7 @@ void IGameCallback::getAllowedArts(std::vector &out, std::vectorarth->*arts).push_back(&(VLC->arth->artifacts[i])); } } + for (int i = 0; i < (VLC->arth->*arts).size(); i++) { CArtifact *art = (VLC->arth->*arts)[i]; @@ -205,6 +206,11 @@ void IGameCallback::getAllowed(std::vector &out, int flags) getAllowedArts(out,&CArtHandler::majors, CArtifact::ART_MAJOR); if(flags & CArtifact::ART_RELIC) getAllowedArts(out,&CArtHandler::relics, CArtifact::ART_RELIC); + if (!out.size()) //no arts are avaliable + { + out.resize(64); + std::fill_n(out.begin(), 64, &(VLC->arth->artifacts[2])); //magic + } } ui16 IGameCallback::getRandomArt (int flags) @@ -227,6 +233,8 @@ ui16 IGameCallback::getRandomArt (int flags) case CArtifact::ART_RELIC: ptr = &VLC->arth->relics; break; + default: //special artifacts should not be erased + return art->id; } ptr->erase (std::find(ptr->begin(), ptr->end(), art)); //remove the artifact from avaliable list return art->id;