mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-20 20:23:03 +02:00
Fix spells amount
This commit is contained in:
parent
68d052ac5c
commit
331f02be33
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user