mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-21 00:19:29 +02:00
vcmi: add PERCENT_TO_TARGET_SOURCE value type
It will break saves!!! Added a new value type to bonuses which allows to add percentage only to one foreign bonus source, for example, to add percentage to all bonuses from secondary skills from hero special.
This commit is contained in:
@ -849,6 +849,10 @@ bool JsonUtils::parseBonus(const JsonNode &ability, Bonus *b)
|
||||
if (!value->isNull())
|
||||
b->source = static_cast<Bonus::BonusSource>(parseByMap(bonusSourceMap, value, "source type "));
|
||||
|
||||
value = &ability["targetSourceType"];
|
||||
if (!value->isNull())
|
||||
b->targetSourceType = static_cast<Bonus::BonusSource>(parseByMap(bonusSourceMap, value, "target type "));
|
||||
|
||||
value = &ability["limiters"];
|
||||
if (!value->isNull())
|
||||
b->limiter = parseLimiter(*value);
|
||||
|
Reference in New Issue
Block a user