1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-18 17:40:48 +02:00

Merge branch 'fix-spells-amount' into cpp-map-editor

This commit is contained in:
nordsoft 2022-09-09 16:20:13 +04:00
commit a0561e9d79

View File

@ -257,7 +257,7 @@ void CCreature::addBonus(int val, Bonus::BonusType type, int subtype)
if(existing.empty())
{
auto added = std::make_shared<Bonus>(Bonus::PERMANENT, type, Bonus::CREATURE_ABILITY, val, getIndex(), subtype, Bonus::BASE_NUMBER);
auto added = std::make_shared<Bonus>(Bonus::PERMANENT, type, Bonus::CREATURE_ABILITY, val, getIndex(), subtype, Bonus::ADDITIVE_VALUE);
addNewBonus(added);
}
else
@ -611,9 +611,6 @@ CCreature * CCreatureHandler::loadFromJson(const std::string & scope, const Json
if(!node["shots"].isNull())
cre->addBonus(node["shots"].Integer(), Bonus::SHOTS);
if(!node["spellPoints"].isNull())
cre->addBonus(node["spellPoints"].Integer(), Bonus::CASTS);
loadStackExperience(cre, node["stackExperience"]);
loadJsonAnimation(cre, node["graphics"]);
loadCreatureJson(cre, node);