Add search_recall_list=only to search the recall list, but not the map
This is intended as a more clear way of doing 'x,y=recall,recall' and omitting search_recall_list. Note that search_recall_list=no with x,y=recall,recall produces a useless [role] which only runs the [else] block(s).
Add reassign attribute
Optional attribute, default 'yes'. If 'no' then do not re-assign the role if a unit already has the role. If 'no' and no unit has the role, the role is still assigned.
Refactor auto_recall as a sub-tag
Instead of a yes|no attribute, if there is an [auto_recall] sub-tag then recall the unit from the recall list. This acts as a [recall] tag without any StandardUnitFilterto which we add id=$unit.id and issue the recall.
This is meant to replace ~RIGHT() and also the newer ~LEFT(),
with one exception: ~RIGHT() will still be the standard way to
make a unit's portrait go on the right by default.
victory is an unsynced event to its potentially unsafe to change the
gamestate in it, this mostly effects LoW (which can be played as a mp
campaign) where i replaced most victory events.
But it also effects sp becasue it can casue bugs to create units in
unsynced events which are used later (here: in later scenarios), so i
replaced also all sp victory events that do that.
Note that the 'scenario_end event'+'proceed_to_next_scenario filter' has
a slightly different meaning than 'victory event': the second gets fired
when there is a local human side who won the scneario while the first
gets fired if there is any human side who on the scenario. In sp this
is the same since there are no remote human sides, but in mp this is the
reason why the first is synced and the second is not.
We could add a seperate event for this case ("before next scenario" or
similar) for easier use, but i didn't find a good name for
that yet.
- search_recall_list=yes|no (default yes)
- [else] tag which is run if no unit matches
- auto_recall=yes|no (default no) which recalls the unit if it's on the recall list
Added some features:
1) on_event now supports a comma separated list of event names in its first parameter
2) on_event now supports a number as second parameter that specifies in which order the event handlers are called.
3) on_event now passes wesnoth.current.event_context to the handler function, since the handler function will most likeley need it.
Firstly, there was a typo in the parse_fog_cfg utility function.
Secondly, wesnoth.get_sides returns a table of side proxy tables, not a
list of side numbers. I changed [lift_fog] and [reset_fog] to iterate through
the table returned by parse_fog_cfg.
this has 2 advantages:
1) It decreased savefile size since the event is no longer sotred in
each savefile.
2) The ABILITY_FEEDING no longer assumes its used from within
[abilities]
This means [object], [advancement], and [trait] tags within [modify_unit]
can now use delayed_variable_substitution=yes.
This is currently needed for adding teleport, backstab, and leadership abilities.
This is more about adding Lua API for things that should have it than porting WML tags to Lua.
The following new Lua API functions have been added to the wesnoth table:
- add_fog, remove_fog
- add_sound_source, remove_sound_source, get_sound_source
- log
- ~LEFT() does the opposite of ~RIGHT(), but takes higher priority;
use it to force an image to the left that's normally on the right
(eg female silver mage)
- image=~RIGHT() means "use normal portrait, but on the right"