1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Extend Bonus.addInfo to integer vector (#427)

* changed Bonus::additionalInfo to integer vector

* fixed deserialization for old savegames

* removed newline from JsonNode::toJson()

* updated bonus schema; SPELL_AFTER_ATTACK and SPELL_BEFORE_ATTACK use new addInfo format

* removed unnecessary init in Bonus constructor
This commit is contained in:
Henning Koehler
2018-03-12 18:20:18 +13:00
committed by Alexander Shishkin
parent 83c6ffbda0
commit 7f76648a7c
11 changed files with 199 additions and 41 deletions

View File

@@ -181,7 +181,7 @@ void Timed::prepareEffects(SetStackEffect & sse, const Mechanics * m, const Effe
const auto tier = std::max(affected->creatureLevel(), 1); //don't divide by 0 for certain creatures (commanders, war machines)
if(bonus)
{
switch(bonus->additionalInfo)
switch(bonus->additionalInfo[0])
{
case 0: //normal
switch(tier)