this would in theory give the player
the option to postpone a unit
advancement by selecting an invalid
advancement index. Now we just use the
first advancement in case of an invalid
advancement index.
1) use ai unit advancement asepect also
during [event]s fixes#4605
previously advancements of ai units
invoked by [event]s for example by
unstoring a unit with enough xp would
always do a purely random advancement even if
it happend during the ais own turn. Now the
advancemt_aspect is considered. I don't really
know how the code inside ai/ works so i just
took the easiert way to get a advancements_aspect
from the manager. In particular this leaves a
TODO comment about whether the advancemnts_aspect
of advance_unit_at (and thus of
attack_and_advance) can not be removed or not
because i don't know whether the advancement
aspect is effectively a singleton (per side)
or not.
2) support amlas in ai units_advancement_aspect
The built-in string module is set as the metatable index for the stringx module, and the stringx module is set as the metatable index for strings, meaning all string and stringx methods are available through (''):method_name.
This also enables direct indexing of strings to get individual characters (ie ('str')[1] and the like), which package.lua already assumed even though it didn't work. Negative indices are supported to, and index from the end of the srring.
New functions:
- stringx.split
- stringx.parenthetical_split
- stringx.map_split
- stringx.escaped_split
- stringx.quoted_split
- stringx.anim_split
- stringx.join
- stringx.join_map
- New functions: wml.find_child, wml.attribute_count, wml.equal, wml.valid
- When converting a Lua table to WML, the engine will no longer accept invalid attributes
- Use of wml.tovconfig in plugin or map generation scripts is deprecated (it already doesn't quite work properly in those contexts but still could've been used as a way to test a table's validity as WML)
The verbosity settings are a bit different, but other than that it
should be a drop-in replacement for the old shell script.
Wesnoth's --validcache option isn't used any more, which is part of
the cleanup for #4587 (it didn't speed anything up, because all of
the calculation for the checksum was still done).
* some dunefolk sprite updates
* some revisions to updates
* revise lvl1 naga sprite to look less like existing fighter
* some more sprite revisions
* some base-frame edits and partial path reorganization
* revised firetrooper base-frame
* little pilot flame for firetrooper torch standing anim
* dunefolk sunderer line base sprites
* finish dunefolk sprite directory reorg
Changes:
Make objective notes in S05, 06, 07, & 11 more blunt
S02: Slightly improve dialog
S04: Capitalization fix
S05: Dialog tweak for possible addition of nagas with ranged attack
S09: Improve flow of victory dialog
S09: Change gameplay and difficulty to eliminate tomato surprise
S11: Bump up turn limit
S12: Have saurian elders under player control
S12: Fine-turn enemy recruitment for slightly more clasher line units
In the load-game dialog, this makes deleting a file select the next
visible game save, thus it fixes#4125.
Credit and many thanks to DisherProject for the inspiration and hard
work of debugging where to fix this.
There should never again be a bug where aspects of one type return nil instead of their value.
If support for a new type isn't explicitly added either in lua_object or in impl_ai_aspect_get, it'll raise a runtime error instead of returning nil.
This allows batching all of the tests that are expected to return status zero,
which is currently 161 tests, and running the batch with a single instance of
Wesnoth. It doesn't include the changes to the run_wml_tests script to use
this new feature.
Timing on my PC:
* 4 seconds to run a single test on a debug build
* 90 seconds to run the whole batch of 161 on a debug build
* 1.2 seconds to run a single test on a release build
* 31.2 seconds to run the whole batch of 161 on a release build