Sat 09 Mar 2013 08:49:45 AM UTC, original submission:
In current Wesnoth trunk r56459, [object][effect]apply_to=variation only works correctly once for each affected unit.
This is bug most notably results in the unit's baseframe not being updated anymore after the first variation-affecting object is applied.
I am attaching a WML snippet with example code that creates a unit with a given variation and applies objects to it in succession to transform it to various variations accepted by its unit type (in this case, a Walking Corpse).
This works mostly fine [1] on Wesnoth 1.11.1 and earlier (including 1.10.x), but on current trunk the unit remains with the baseframe and stats for the first variation applied via [object]. If the unit is initially spawned with a variation set with the variation= attribute under [unit] directly, it will get stuck with that variation's baseframe and stats instead and ignore any subsequent variation-affecting objects.
Using git bisect to test various builds, I found revision 56062 (by jamit) to be the culprit, but I am not completely sure what the changes involved are, and probably won't investigate the issue any further since the unit/unit_type code has always been too dense for my taste. I am not completely sure whether this is the correct commit either, since I had to skip one commit that wouldn't compile at all while bisecting.
[1] NOTE: on all aforementioned versions there is a glitch with the unit's portrait in [message] actions. This is not relevant to this bug report and I will probably file a separate bug later.
|