Skip to content

Commit

Permalink
Add various new features to the schema
Browse files Browse the repository at this point in the history
Addresses #3730

This is everything I could find by perusing the commit log.
I may have missed something, however.
  • Loading branch information
CelticMinstrel committed Mar 3, 2019
1 parent a50ec3f commit bfc997c
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 8 deletions.
15 changes: 13 additions & 2 deletions data/schema/core/actionwml.cfg
Expand Up @@ -190,6 +190,7 @@
{FILTER_TAG "filter" unit {INSERT_TAG}}
{SIMPLE_KEY x s_int}
{SIMPLE_KEY y s_int}
{SIMPLE_KEY location_id string}
{DEFAULT_KEY clear_shroud s_bool yes}
{DEFAULT_KEY animate s_bool no}
{DEFAULT_KEY check_passability s_bool yes}
Expand All @@ -202,6 +203,7 @@
{SIMPLE_KEY y s_int}
{SIMPLE_KEY mask map_data}
{SIMPLE_KEY mask_file string}
{SIMPLE_KEY alignment mask_alignment}
{DEFAULT_KEY border s_bool no}
[tag]
name="rule"
Expand Down Expand Up @@ -248,6 +250,7 @@
{DEFAULT_KEY animate s_bool yes}
{SIMPLE_KEY x s_coordinates}
{SIMPLE_KEY y s_coordinates}
{SIMPLE_KEY location_id string}
[/tag]
[tag]
name="allow_recruit,disallow_recruit,set_recruit"
Expand Down Expand Up @@ -343,6 +346,8 @@
{SIMPLE_KEY to_x s_range_list}
{SIMPLE_KEY to_y s_range_list}
{SIMPLE_KEY to_location string}
{SIMPLE_KEY dir dir_list}
{DEFAULT_KEY clear_shroud s_bool no}
{DEFAULT_KEY fire_event s_bool no}
{DEFAULT_KEY check_passability s_bool yes}
{SIMPLE_KEY force_scroll s_bool}
Expand Down Expand Up @@ -485,7 +490,8 @@
name="replace_map"
max=infinite
{INSERT_TAG}
{SIMPLE_KEY map map_data}
{DEPRECATED_KEY map map_data}
{SIMPLE_KEY map_data map_data}
{SIMPLE_KEY map_file string}
{DEFAULT_KEY expand s_bool no}
{DEFAULT_KEY shrink s_bool no}
Expand Down Expand Up @@ -550,6 +556,7 @@
{SIMPLE_KEY value string}
{SIMPLE_KEY x s_int}
{SIMPLE_KEY y s_int}
{SIMPLE_KEY location_id string}
[tag]
name="from"
{SIMPLE_KEY x s_int}
Expand Down Expand Up @@ -621,6 +628,8 @@
{DEFAULT_KEY highlight s_bool yes}
{SIMPLE_KEY sound string_list}
{SIMPLE_KEY voice string_list}
{SIMPLE_KEY male_voice string_list}
{SIMPLE_KEY female_voice string_list}
{SIMPLE_KEY variable string}
{FORMATTING_KEYS}
{SHOW_IF_TAG}
Expand Down Expand Up @@ -732,6 +741,7 @@
{SIMPLE_KEY name string}
# Override some supertag keys to allow variable substitutions
{DEFAULT_KEY visible_in_fog s_bool yes}
{FILTER_TAG "filter_side" side ()}
[/tag]
[tag]
name="remove_item"
Expand Down Expand Up @@ -1197,13 +1207,14 @@
{SIMPLE_KEY facing dir}
{SIMPLE_KEY x s_coordinates}
{SIMPLE_KEY y s_coordinates}
{SIMPLE_KEY location_id string}
[/tag]
[/tag]
[tag]
name="random_placement"
max=infinite
{INSERT_TAG}
{REQUIRED_KEY num_items f_unsigned,s_unsigned}
{REQUIRED_KEY num_items f_unsigned,s_unsigned,s_int_percent}
{REQUIRED_KEY variable string}
{DEFAULT_KEY min_distance s_unsigned 0}
{DEFAULT_KEY allow_less s_bool no}
Expand Down
2 changes: 1 addition & 1 deletion data/schema/core/addons.cfg
Expand Up @@ -117,7 +117,6 @@
{SIMPLE_KEY terrain_liked terrain_list}
[/tag]

# TODO: Is [event] really allowed at toplevel, outside a [scenario] or [era]?
[tag]
name="event"
max=infinite
Expand Down Expand Up @@ -458,6 +457,7 @@
{SIMPLE_KEY image string}
{SIMPLE_KEY mask string}
{SIMPLE_KEY lawful_bonus int}
{SIMPLE_KEY liminal_bonus int}
{SIMPLE_KEY red int}
{SIMPLE_KEY green int}
{SIMPLE_KEY blue int}
Expand Down
1 change: 1 addition & 0 deletions data/schema/core/conditionalwml.cfg
Expand Up @@ -36,6 +36,7 @@
{SIMPLE_KEY less_than_equal_to string}
{SIMPLE_KEY boolean_equals string}
{SIMPLE_KEY boolean_not_equals string}
{SIMPLE_KEY formula formula}
[/tag]
[tag]
name="found_item"
Expand Down
2 changes: 1 addition & 1 deletion data/schema/filters/location.cfg
Expand Up @@ -14,7 +14,7 @@
{SIMPLE_KEY radius s_int}
{SIMPLE_KEY formula formula}
{SIMPLE_KEY lua_function string}
{SIMPLE_KEY location_id string}
{SIMPLE_KEY location_id string_list}

{FILTER_TAG "filter" unit ()}
{FILTER_TAG "filter_owner" side ()}
Expand Down
2 changes: 2 additions & 0 deletions data/schema/filters/unit.cfg
Expand Up @@ -31,6 +31,8 @@
{SIMPLE_KEY lua_function string}
{SIMPLE_KEY ai_special string}
{SIMPLE_KEY recall_cost s_range_list}
{SIMPLE_KEY usage string}
{SIMPLE_KEY alignment alignment}

[tag]
name="filter_wml"
Expand Down
11 changes: 7 additions & 4 deletions data/schema/game_config.cfg
Expand Up @@ -88,6 +88,11 @@
name=alignment
value="lawful|neutral|chaotic|liminal"
[/type]
[type]
name=mask_alignment
value="even|odd"
# TODO: Document the third option once we finalize its name
[/type]
[type]
name=ai_usage
value="scout|fighter|archer|mixed fighter|healer|null"
Expand Down Expand Up @@ -388,10 +393,8 @@
[tag]
name="lua"
max=infinite
[key]
name="code"
type="string"
[/key]
{SIMPLE_KEY name string}
{SIMPLE_KEY code string}
{DATA_TAG args 0 1}
[/tag]
[/tag]
Expand Down
20 changes: 20 additions & 0 deletions data/schema/units/abilities.cfg
@@ -1,4 +1,13 @@

#define BASED_ON_SPECIAL NAME
[tag]
name={NAME}
max=infinite
super="units/unit_type/attack/specials/" + {NAME}
{FILTER_TAG "filter_student" unit ()}
[/tag]
#enddef

[tag]
# Using invalid characters to ensure it doesn't match a real tag.
name="~generic~"
Expand Down Expand Up @@ -69,12 +78,16 @@
name="resistance"
max=infinite
super="units/unit_type/abilities/~value~"
{FILTER_TAG "filter_weapon" weapon ()}
{FILTER_TAG "filter_second_weapon" weapon ()}
[/tag]
[tag]
name="leadership"
max=infinite
super="units/unit_type/abilities/~generic~"
{SIMPLE_KEY value f_int}
{FILTER_TAG "filter_weapon" weapon ()}
{FILTER_TAG "filter_second_weapon" weapon ()}
[/tag]
[tag]
name="illuminates"
Expand Down Expand Up @@ -119,8 +132,15 @@
super="units/unit_type/abilities/~generic~"
{FILTER_TAG "filter_second_weapon" weapon ()}
[/tag]
{BASED_ON_SPECIAL "attacks"}
{BASED_ON_SPECIAL "chance_to_hit"}
{BASED_ON_SPECIAL "damage"}
{BASED_ON_SPECIAL "drains"}
{BASED_ON_SPECIAL "berserk"}
[tag]
name="*"
max=infinite
super="units/unit_type/abilities/~generic~"
[/tag]

#undef BASED_ON_SPECIAL

0 comments on commit bfc997c

Please sign in to comment.