Commit graph

31 commits

Author SHA1 Message Date
Celtic Minstrel
d090f91bce Alter the special notes syntax in EffectWML so that the note macros can be reused in that context 2019-10-04 23:49:05 -04:00
newfrenchy83
f6cc138c20 Fix grammatical error 2019-09-17 22:06:04 +11:00
Steve Cotton
af91654e26 Fix the build
Explicitly use t_str() to avoid an ambiguous construction from
7bee8ee157, which made GCC9 error out because it
could alternatively use t_string::t_string(const string &).

Resolve the merge conflict from 26d1ca7a7d
2019-09-15 22:55:05 +02:00
Celtic Minstrel
26d1ca7a7d Merge pull request #4351 from wesnoth/special_notes
Update to new special notes syntax in campaigns
2019-09-15 13:39:16 -04:00
Celtic Minstrel
7bee8ee157 Add special note support in [unit] and [effect]. 2019-09-15 13:19:17 -04:00
Celtic Minstrel
15f431785a Add [special_note] tag in [unit_type] as a neater way of specifying special notes for the unit's description 2019-09-12 08:51:05 -04:00
Celtic Minstrel
e1cabedc03 Add [special_note] tag in [unit_type] as a neater way of specifying special notes for the unit's description 2019-09-12 08:50:38 -04:00
Steve Cotton
b2cd1cf6c3 Handle unit overlays as modifications, allow [effect] to remove them
Possible fix for #4058, with the following logic:

* If non-empty, [unit]overlay= is handled by adding modifications
* unit::write will always output an empty overlay=
* The Lua API's get_units() will still provide the list of overlays
* [effect]apply_to=overlay can now remove as well as add overlays
* [remove_unit_overlay] is implemented with [effect]apply_to=overlay

Using [object]s with durations hasn't been tested, but expected effects:
* An expired add= followed by a non-expired remove= will simply cause the remove=
    to have no effect when std::remove(overlays_ ...) is called.
* A remove= followed by [remove_unit_overlay] cause the [remove_unit_overlay] to be a no-op,
    and the overlay will reappear when the first remove= expires. This edge case is already
	documented as unsupported on the wiki.
2019-08-10 23:25:04 +02:00
Steve Cotton
0f948f793c Refactoring [movetype] to deprecate the "flies" key, use "flying" instead
This makes [movetype] consistent with [unit]. The code in movetype.cpp is used
for handling both of those tags and so already had support for "flying" in the
merge() and write() functions.

This shouldn't be backported to 1.14. For this reason, it also includes
handling the C++ todos to use C++14's std::make_unique.
2019-08-01 18:58:56 +02:00
Celtic Minstrel
bfc997c91e Add various new features to the schema
Addresses #3730

This is everything I could find by perusing the commit log.
I may have missed something, however.
2019-03-03 11:56:34 -05:00
newfrenchy83
7114174789 Fix #3811 negative value in heals ability
When multiple negative heal abilities are present, the game now
chooses the ability with the lowest value. The leadership ability
now also uses the same get_composite_value function that is also
used by most other abilities
2019-01-02 20:29:52 +01:00
pentarctagon
7034c8f97b Run WML schema validation in travis. Fixes #3709
This adds running the WML schema validation in travis.  It also updates the schema itself and fixes a few WML errors so that core and all campaigns under all difficulties pass the schema validation.
2018-11-24 10:35:22 -06:00
Celtic Minstrel
52c4dc0e3d Add a validator subclass specialized for validating WML schemas against the WML schema schema 2018-11-03 17:09:25 -04:00
Celtic Minstrel
4674e97eb6 Schema: Add a macro for links (and make use of it) 2018-10-23 22:49:53 -04:00
Celtic Minstrel
3a3f0d25af Schema: Accept color ranges/palettes defined in [effect]apply_to=image_mod 2018-10-23 22:49:30 -04:00
Celtic Minstrel
63da3ecd2a Schema: Accept variable substitution in EffectWML 2018-10-23 22:45:52 -04:00
Celtic Minstrel
d080c69356 Schema: Fix a few more cases of keys and tags not accepting variable substitution 2018-10-23 22:41:57 -04:00
Celtic Minstrel
4ba0c2b8fd Schema: Fix a few incorrect types 2018-10-23 22:41:50 -04:00
Celtic Minstrel
2232e49aa2 Schema: Add some undocumented keys and tags in [unit] 2018-10-23 22:41:46 -04:00
Celtic Minstrel
71da996827 Schema: Add undocumented features for EffectWML 2018-10-23 22:40:06 -04:00
Celtic Minstrel
3d05628fcf Schema: Accept variable substitution in [unit] 2018-10-23 22:39:54 -04:00
Celtic Minstrel
e01567c434 Schema: Promote [object]duration= key to non-ActionWML objects
It's used by the object auto-expiry mechanism, so it's meaningful
even outside of ActionWML.
2018-10-23 22:39:36 -04:00
Celtic Minstrel
24608d0632 Schema ActionWML: Small bugfixes and add undocumented stuff from perusing source code 2018-10-23 22:38:16 -04:00
Celtic Minstrel
7ab5fabbf2 Schema: Add all known ActionWML and ConditionalWML tags (based on wiki)
This also finishes up the StoryWML definition, adds validation for
map and shroud data, and a few other small schema fixes
2018-10-23 22:37:44 -04:00
Celtic Minstrel
3211014428 Fix [effect][set_specials] not correctly allowing special ability tags 2018-10-23 22:37:43 -04:00
Celtic Minstrel
ff66583c0d Schema: Fix definition of [effect] tags for removing/modifying attacks 2018-10-23 22:37:35 -04:00
Celtic Minstrel
efa30b3840 Schema: Accept [elseif] in [if] and change [switch][default] to [else] 2018-10-23 22:37:32 -04:00
Celtic Minstrel
ed7c3dbfbc Missed a couple weapon special definitions 2018-10-23 22:37:28 -04:00
Celtic Minstrel
bebab878e3 Support multiple super tags and even conditional super tags
Use this to conditionally import [unit] keys in [side] based on no_leader
2018-10-23 22:37:28 -04:00
Celtic Minstrel
fb30b594b6 Support [switch] and [if] in [tag]
Use this new feature to validate [effect] tags
2018-10-23 22:37:24 -04:00
Celtic Minstrel
3a65a14bcb Implement validation of the core game config WML
Currently this is disabled by default
Use --validate command-line argument to enable

The following new features were added in the schema format:
* Union, intersection, and list types
* Keys can specify a union of known types on-the-fly
* Key and tag names can include wildcards (* and ?, glob-style)
* Tags support any_key=yes, which means unrecognized subtags will be ignored
* Tags and keys support deprecated=yes (unimplemented)
* Specify max=infinite instead of max=-1
2018-10-23 22:36:40 -04:00