diff --git a/client/CCastleInterface.cpp b/client/CCastleInterface.cpp index d844d60fe..1bea648cf 100644 --- a/client/CCastleInterface.cpp +++ b/client/CCastleInterface.cpp @@ -1128,7 +1128,7 @@ int CCastleInterface::CCreaInfo::AddToString(std::string from, std::string & to, { if (!numb) return 0;//do not add string if 0 - boost::algorithm::replace_first(from,"%+d", "+"+boost::lexical_cast(numb)); + boost::algorithm::replace_first(from,"%+d", (numb > 0 ? "+" : "")+boost::lexical_cast(numb)); //negative values don't need "+" to+="\n"+from; return numb; } @@ -1157,7 +1157,7 @@ void CCastleInterface::CCreaInfo::clickRight(tribool down, bool previousState) else if ( bld.find(8)!=bld.end())//else if citadel+50% to basic summ+=AddToString(CGI->buildh->buildings[ci->town->subID][8]->Name()+" %+d",descr,summ/2); - summ+=AddToString(CGI->generaltexth->allTexts[63] + " %+d",descr, //plague + summ+=AddToString(CGI->generaltexth->allTexts[63] + " %+d",descr, //double growth or plague summ * CGI->creh->creatures[crid]->valOfBonuses(Bonus::CREATURE_GROWTH_PERCENT)/100); summ+=AddToString(CGI->generaltexth->artifNames[133] + " %+d",descr, diff --git a/hch/CObjectHandler.h b/hch/CObjectHandler.h index 5220d2be6..af9a0d583 100644 --- a/hch/CObjectHandler.h +++ b/hch/CObjectHandler.h @@ -1052,7 +1052,7 @@ class DLL_EXPORT CBank : public CArmedInstance template void serialize(Handler &h, const int version) { - h & static_cast(*this); + h & static_cast(*this); h & index & multiplier & artifacts & daycounter & bc; } }; diff --git a/lib/CGameState.cpp b/lib/CGameState.cpp index e979421a1..93f3ee708 100644 --- a/lib/CGameState.cpp +++ b/lib/CGameState.cpp @@ -969,7 +969,8 @@ std::vector CStack::activeSpells() const BonusList spellEffects = getSpellBonuses(); for(BonusList::const_iterator it = spellEffects.begin(); it != spellEffects.end(); it++) { - ret.push_back(it->id); + if (!vstd::contains(ret, it->id)) //do not duplicate spells with multiple effects + ret.push_back(it->id); } return ret; diff --git a/server/CGameHandler.cpp b/server/CGameHandler.cpp index 9f4b4c2d4..aec1088ef 100644 --- a/server/CGameHandler.cpp +++ b/server/CGameHandler.cpp @@ -1220,9 +1220,14 @@ void CGameHandler::newTurn() { if((**j).creatureDwelling(k))//there is dwelling (k-level) { - sac.creatures[k].first += (**j).creatureGrowth(k); - if(gs->getDate(0) == 1) //first day of game: use only basic growths - amin(sac.creatures[k].first, VLC->creh->creatures[(*j)->town->basicCreatures[k]]->growth); + if (n.specialWeek == NewTurn::PLAGUE) + sac.creatures[k].first = (**j).creatures[k].first / 2; //halve their number, no growth + else + { + sac.creatures[k].first += (**j).creatureGrowth(k); + if(gs->getDate(0) == 1) //first day of game: use only basic growths + amin(sac.creatures[k].first, VLC->creh->creatures[(*j)->town->basicCreatures[k]]->growth); + } } } //creatures from town events