Abilities are sometimes checked at locations other than a unit's
current location. If the checked location is adjacent to the unit's
location, then (before this fix) the unit could affect itself as an
adjacent unit.
Lite has the same dimensions of the H18 menu button, which is unused
and moved to attic. Since all uses of lite were menus, I reassigned
them to use the current H20 menu image.
When pangoize detects an old-style color spec, it prints a message that it needs a "manual fix." Unfortunately, the old markup used decimal values while pango uses hexadecimal, and authors were left to do the conversion themselves.
My modification not only does the hex conversion, it provides pango code ready to copy and paste into the line.
Going over this:
rgb =: First step is to turn the original regular expression into a regex object. The one change is that later on, wmllint turns non-pango "<" and ">" into "</>", so I have the regex match those too, in case we are dealing with a file that has already been through wmllint before.
if rgb: Having turned the original search into a regex object, we are ready for an if test again.
r, g, b =: We need Python to recognize these strings as numbers.
if > 255: At least one old campaign ("A Sortie") has color specs that include values over 255. Given the impossibility of deciphering what color the author may have intended, I think the proper thing to do is to print an error pointing to the problem.
else: This, of course, is the normal case.
hexed: Here we convert our numbers to hexadecimal, and back into a string. Because numbers up to 15 will only have one hex digit and we need two, we will leave a "0" when we remove the "0x" prefix; then we take the last two characters, lopping off the zero from the numbers greater than 15 that already have two digits.
print: The new error message. With the regex object, we can cite the color spec specifically, not just refer to it as being "in line". And at the end is pango code, ready to copy and paste.
As part of a GSoC proposal I added a new aspect so a scenario editor can control advancements in two ways:
1. Define a aspect with a string-value like "Swordsman, Knight", so the units of interesst will always advance to this
2. Use the LUA-Engine and return a function of the form advance(x, y) which will itself return a string-value
like "Swordsman, Knight". Everytime a ai-unit advances advance(x, y) will be called.
The corresponding wikipage (http://wiki.wesnoth.org/AiWML) is going to be updated soon.