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
sigurdfdragon
6e2fbc7b1a
Schema: Fix travis error by allowing additional keys in two situations
...
1. Allow carryover_percentage & carryover_add with
victory_when_enemies_defeated=no. Code from newfrenchy83
2. Allow use of current_time in [time_area].
2019-07-02 23:19:38 -04:00
gfgtdf
daf054752a
support item_name= in [store_items]
...
we use it in SotA16 to make the scenario more robust against
[modification]s that might add [item]s for decoration.
2019-03-20 20:27:33 +01: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
mattsc
cf3be040ca
Schema validation: add missing AI aspect
2018-12-03 18:19:44 -08:00
mattsc
f07897cba9
Schema validation: support Micro AI named location keys
2018-12-03 18:19:44 -08:00
mattsc
dca3fe71bb
Schema validation: add new AI keys
2018-12-03 18:19:37 -08:00
mattsc
afb394c4b1
Merge pull request #3723 from mattsc/rca_ai_changes
...
Default AI changes
2018-12-02 08:42:42 -08:00
Celtic Minstrel
ea9fddcd23
Support [disallow_end_turn]reason= and use it in the tutorial
2018-11-24 17:46:29 -05: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
e7903874ec
Add new schema keys for the game config
2018-11-18 00:45:44 -05:00
mattsc
f53e3b9565
Schema validation: remove attack_depth aspect
...
It's been removed from the AI.
2018-11-16 06:45:40 -08:00
Celtic Minstrel
df4413ae66
Schema: Move list types into a separate config file
2018-11-04 18:37:51 -05: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
e3b17d3e9f
GUI2 Schema: Make use of the key macros
2018-10-23 22:49:52 -04:00
Celtic Minstrel
844b20da40
GUI2 Schema: Use max=infinite instead of max=-1
2018-10-23 22:49:51 -04:00
Celtic Minstrel
e47ace53a9
Schema: Fix a couple more missing details
2018-10-23 22:49:43 -04:00
Celtic Minstrel
68bb024efe
Schema: Accept variable substitution in [do_command]
2018-10-23 22:49:42 -04:00
Celtic Minstrel
bf814914e1
Schema: Fix some bugs in the [micro_ai] definition
2018-10-23 22:49:38 -04:00
Celtic Minstrel
a50a3f399b
Schema: Accept [set_menu_item]use_hotkey=only
2018-10-23 22:49:35 -04:00
Celtic Minstrel
32a3dc5835
Schema: Accept logger=log as a synonym for logger=info
2018-10-23 22:49:34 -04:00
Celtic Minstrel
d70fee5afc
Schema: Fix issue with matching [modify_ai] for attacks aspect
2018-10-23 22:49:32 -04:00
Celtic Minstrel
51764956e3
Schema: Fix typo in [store_unit]
2018-10-23 22:49:31 -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
61ee9bcf6b
Schema: Don't fail if a map contains trailing or leading whitespace on lines
2018-10-23 22:49:29 -04:00
Celtic Minstrel
bc2054ec10
Schema: Fix some tags being allowed only once instead of unlimited times
2018-10-23 22:49:27 -04:00
Celtic Minstrel
66ae7f3b13
Schema: Accept variable substitution in [set_variable] root= and round=
2018-10-23 22:49:26 -04:00
Celtic Minstrel
ebc6285683
Schema: Allow variable substitution in [label]
2018-10-23 22:49:25 -04:00
Celtic Minstrel
2a5e8c7b41
Schema: side=global is valid in [*_global_variable]
2018-10-23 22:49:23 -04:00
Celtic Minstrel
604a3ec941
Schema: It turns out that [endlevel]bonus= is actually a real number!
2018-10-23 22:49:20 -04:00
Celtic Minstrel
9fc1dde19c
Schema: Apparently config_name IS valid in [generator]
2018-10-23 22:48:18 -04:00
Celtic Minstrel
ed137c1f85
Schema: Allow variable substitution for fake unit genders
2018-10-23 22:47:09 -04:00
Celtic Minstrel
d86ac67b60
Schema: Missed an allowed key in [label]
2018-10-23 22:45:54 -04:00
Celtic Minstrel
63da3ecd2a
Schema: Accept variable substitution in EffectWML
2018-10-23 22:45:52 -04:00
Celtic Minstrel
c7d9b6641e
Schema: [micro_ai] AI-specific keys are only relevant if action is not delete
2018-10-23 22:45:51 -04:00
Celtic Minstrel
96c705c795
Schema: Make [event]name= optional
2018-10-23 22:45:50 -04:00
Celtic Minstrel
ffbaa93d6a
Schema: Fix typo
2018-10-23 22:45:40 -04:00
Celtic Minstrel
a8f767e887
Schema: Fix a few incorrect types
2018-10-23 22:45:01 -04:00
Celtic Minstrel
70ea5c9aae
Schema: Another incorrect key type
2018-10-23 22:43:38 -04:00
Celtic Minstrel
eb041ca034
Schema: Add some undocumented child tags of ScenarioWML
2018-10-23 22:43:36 -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
e83371b40c
Schema: Allow scenarios with no sides (is this expected?)
2018-10-23 22:41:56 -04:00
Celtic Minstrel
defea0679f
Schema: Definition of the [generator] tag
2018-10-23 22:41:51 -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
6845b48697
Schema: Fix a few more instances of keys not accepting variable substitution
2018-10-23 22:41:39 -04:00
Celtic Minstrel
2473bbd237
Schema: Fix incorrect type
2018-10-23 22:40:09 -04:00