Follow-up Comment #5, patch #1063 (project wesnoth):

OK, I pondered this for a while, and the patch will not really work for all
possible cases. A user could make a trait to increase the max_experience on a
unit, so that ADVANCETO has no effect because the value doesn't change at the
[unit] level.

The real maximum experience is determined by the engine after applying all
modifications (objects, traits and AMLAs) that the unit has gained, and we
have no method for exposing that to WML currently. First we would need that
in order to anyone to create a really effective ADVANCETO macro.

A possible option for the time being would be to recursively scan by WML the
contents of <stored-unit>.modifications variable, verifying the contents of
the object[] WML array, trait[] and advance[].

    _______________________________________________________

Reply to this item at:

  <http://gna.org/patch/?1063>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs

Reply via email to