diff --git a/changelog b/changelog index bd9062747d5..bdc737bc79a 100644 --- a/changelog +++ b/changelog @@ -51,6 +51,8 @@ Version 1.9.9+svn: * [illuminated_time], which has been obsolete for a long time, is no longer valid. Using it will cause errors to be thrown * Reintroduced support for [unit][event]s (was until 1.7.10, bug #16259) + * Fixed "error parsing image modifications" message caused by subsequent image + mod additions using the add attribute in [effect] apply_to=image_mod * Miscellaneous and bug fixes: * Fixed compilation on all Debian architectures (Debian bug #636193) * Fixed handling of #ifver and #ifnver preprocessor directives in wmllint diff --git a/data/scenario-test.cfg b/data/scenario-test.cfg index b8b5448154b..00cee28b9c9 100644 --- a/data/scenario-test.cfg +++ b/data/scenario-test.cfg @@ -568,6 +568,10 @@ end apply_to=image_mod add="PAL(FFDC02,EA9752,C4793A,C35029,6B2C29,A34C29,D5561F,343424,353624,BF5746 > BCBCBC,7D7D7D,5E5E5E,434343,232323,3B3B3B,494949,232323,232323,484848)" [/effect] + [effect] + apply_to=image_mod + add="B(50)~R(-50)" + [/effect] [/object] [attack] [/attack] diff --git a/src/unit.cpp b/src/unit.cpp index da478298c8d..1212bef46e8 100644 --- a/src/unit.cpp +++ b/src/unit.cpp @@ -2522,6 +2522,10 @@ void unit::add_modification(const std::string& type, const config& mod, bool no_ LOG_UT << "applying image_mod \n"; mod = effect["add"].str(); if (!mod.empty()){ + if(!image_mods_.empty()) { + image_mods_ += '~'; + } + image_mods_ += mod; }